File tree Expand file tree Collapse file tree 14 files changed +33
-24
lines changed Expand file tree Collapse file tree 14 files changed +33
-24
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ build_firebase_shared(
56
56
FirebaseCppAnalytics
57
57
)
58
58
59
- unity_pack_native (firebase_analytics_swig )
60
59
unity_pack_cs (firebase_analytics_cs )
61
60
62
61
if (FIREBASE_INCLUDE_UNITY )
Original file line number Diff line number Diff line change @@ -99,7 +99,6 @@ mono_add_library(firebase_app_cs
99
99
${firebase_native_library}
100
100
)
101
101
102
- unity_pack_native (firebase_app_swig )
103
102
unity_pack_cs (firebase_app_cs )
104
103
105
104
if (FIREBASE_INCLUDE_UNITY )
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ include(build_shared)
19
19
# Firebase Auth Swig input files
20
20
set (firebase_auth_swig
21
21
src/swig/auth.i
22
+ ${FIREBASE_SOURCE_DIR} /empty.cc
22
23
)
23
24
24
25
# Firebase Auth CSharp files
@@ -70,7 +71,6 @@ build_firebase_shared(
70
71
FirebaseCppAuth
71
72
)
72
73
73
- unity_pack_native (firebase_auth_swig )
74
74
unity_pack_cs (firebase_auth_cs )
75
75
76
76
if (FIREBASE_INCLUDE_UNITY )
Original file line number Diff line number Diff line change @@ -25,14 +25,16 @@ include(build_firebase_aar)
25
25
# OUTPUT_NAME: The output name to use for the shared library
26
26
function (build_firebase_shared LIBRARY_NAME ARTIFACT_NAME OUTPUT_NAME )
27
27
28
- set (shared_target "firebase_${LIBRARY_NAME} _shared" )
29
- add_library (${shared_target} SHARED
30
- ${FIREBASE_SOURCE_DIR} /empty.cc
31
- )
32
- target_link_libraries (${shared_target}
33
- "firebase_${LIBRARY_NAME} _swig"
34
- )
28
+ set (shared_target "firebase_${LIBRARY_NAME} _swig" )
29
+
30
+ # add_library(${shared_target} SHARED
31
+ # ${FIREBASE_SOURCE_DIR}/empty.cc
32
+ # )
33
+
34
+ set (SHARED_TARGET_LINK_LIB_NAMES "firebase_${LIBRARY_NAME} " "firebase_${LIBRARY_NAME} _swig" )
35
+ message ("SHARED_TARGET_LINK_LIB_NAMES is ${SHARED_TARGET_LINK_LIB_NAMES} " )
35
36
37
+ # Update output name
36
38
set_target_properties (${shared_target}
37
39
PROPERTIES
38
40
OUTPUT_NAME "${OUTPUT_NAME} "
@@ -52,12 +54,28 @@ function(build_firebase_shared LIBRARY_NAME ARTIFACT_NAME OUTPUT_NAME)
52
54
PREFIX "lib"
53
55
SUFFIX ".a"
54
56
)
57
+ elseif (ANDROID )
58
+ set_target_properties (${shared_target}
59
+ PROPERTIES
60
+ PREFIX "lib"
61
+ )
55
62
else ()
56
63
set_target_properties (${shared_target}
57
64
PROPERTIES
58
65
PREFIX ""
59
66
)
60
67
endif ()
68
+
69
+ if (ANDROID )
70
+ target_link_options (${shared_target}
71
+ PRIVATE
72
+ "-llog"
73
+ "-Wl,-z,defs"
74
+ "-Wl,--no-undefined"
75
+ # Link against the static libc++, which is the default done by Gradle.
76
+ "-static-libstdc++"
77
+ )
78
+ endif ()
61
79
62
80
unity_pack_native (${shared_target} )
63
81
Original file line number Diff line number Diff line change @@ -224,16 +224,18 @@ endfunction()
224
224
# * Libraries are put into build arch folder
225
225
#
226
226
function (unity_pack_native name )
227
-
228
227
if (NOT FIREBASE_PACK_NATIVE )
229
228
return ()
230
229
endif ()
231
230
231
+ message ("unity_pack_native pack ${name} " )
232
+
232
233
get_target_property (target_type ${name} TYPE )
233
234
234
- if (NOT "${target_type} " STREQUAL "SHARED_LIBRARY" )
235
- return ()
236
- endif ()
235
+ # if(NOT "${target_type}" STREQUAL "SHARED_LIBRARY")
236
+ # message("unity_pack_native ${target_type} not equal SHARED_LIBRARY, returned")
237
+ # return()
238
+ # endif()
237
239
238
240
set (dll_dest "${UNITY_PACK_NATIVE_DIR} /" )
239
241
@@ -256,7 +258,7 @@ function(unity_pack_native name)
256
258
DESTINATION "${dll_dest} "
257
259
COMPONENT "runtime"
258
260
ARCHIVE
259
- DESTINATION "${lib_dest } "
261
+ DESTINATION "${dll_dest } "
260
262
COMPONENT "runtime"
261
263
)
262
264
Original file line number Diff line number Diff line change @@ -89,7 +89,6 @@ mono_add_library(firebase_crashlytics_cs
89
89
FIREBASE_OPENSOURCE
90
90
)
91
91
92
- unity_pack_native (firebase_crashlytics_swig )
93
92
unity_pack_cs (firebase_crashlytics_cs )
94
93
95
94
if (FIREBASE_INCLUDE_UNITY )
Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ build_firebase_shared(
74
74
FirebaseCppDatabase
75
75
)
76
76
77
- unity_pack_native (firebase_database_swig )
78
77
unity_pack_cs (firebase_database_cs )
79
78
80
79
if (FIREBASE_INCLUDE_UNITY )
Original file line number Diff line number Diff line change @@ -68,7 +68,6 @@ build_firebase_shared(
68
68
FirebaseCppDynamicLinks
69
69
)
70
70
71
- unity_pack_native (firebase_dynamic_links_swig )
72
71
unity_pack_cs (firebase_dynamic_links_cs )
73
72
74
73
if (FIREBASE_INCLUDE_UNITY )
Original file line number Diff line number Diff line change @@ -148,7 +148,6 @@ build_firebase_shared(
148
148
FirebaseCppFirestore
149
149
)
150
150
151
- unity_pack_native (firebase_firestore_swig )
152
151
unity_pack_cs (firebase_firestore_cs )
153
152
154
153
if (FIREBASE_INCLUDE_UNITY )
Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ build_firebase_shared(
60
60
FirebaseCppFunctions
61
61
)
62
62
63
- unity_pack_native (firebase_functions_swig )
64
63
unity_pack_cs (firebase_functions_cs )
65
64
66
65
if (FIREBASE_INCLUDE_UNITY )
You can’t perform that action at this time.
0 commit comments