File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,15 @@ else()
298
298
"${app_desktop_HDRS} " )
299
299
endif ()
300
300
301
+ if (ANDROID OR IOS )
302
+ # If building for Android or iOS, include the Flatbuffers source files directly.
303
+ set (app_flatbuffers_srcs ${FlatBuffers_Library_SRCS} )
304
+ set (app_flatbuffers_lib )
305
+ else ()
306
+ set (app_flatbuffers_srcs )
307
+ set (app_flatbuffers_lib flatbuffers )
308
+ endif ()
309
+
301
310
add_library (firebase_app STATIC
302
311
${log_SRCS}
303
312
${log_HDRS}
@@ -311,7 +320,8 @@ add_library(firebase_app STATIC
311
320
memory/atomic.h
312
321
meta/move.h
313
322
memory/unique_ptr.h
314
- memory/shared_ptr.h )
323
+ memory/shared_ptr.h
324
+ ${app_flatbuffers_srcs} )
315
325
316
326
set_property (TARGET firebase_app PROPERTY FOLDER "Firebase Cpp" )
317
327
@@ -339,7 +349,7 @@ target_compile_definitions(firebase_app
339
349
# firebase_app has a dependency on flatbuffers, which needs to be included.
340
350
target_link_libraries (firebase_app
341
351
PRIVATE
342
- flatbuffers
352
+ ${app_flatbuffers_lib}
343
353
${LIBSECRET_LIBRARIES}
344
354
)
345
355
# Automatically include headers that might not be declared.
You can’t perform that action at this time.
0 commit comments