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()
298298 "${app_desktop_HDRS} " )
299299endif ()
300300
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+
301310add_library (firebase_app STATIC
302311 ${log_SRCS}
303312 ${log_HDRS}
@@ -311,7 +320,8 @@ add_library(firebase_app STATIC
311320 memory/atomic.h
312321 meta/move.h
313322 memory/unique_ptr.h
314- memory/shared_ptr.h)
323+ memory/shared_ptr.h
324+ ${app_flatbuffers_srcs} )
315325
316326set_property (TARGET firebase_app PROPERTY FOLDER "Firebase Cpp" )
317327
@@ -339,7 +349,7 @@ target_compile_definitions(firebase_app
339349# firebase_app has a dependency on flatbuffers, which needs to be included.
340350target_link_libraries (firebase_app
341351 PRIVATE
342- flatbuffers
352+ ${app_flatbuffers_lib}
343353 ${LIBSECRET_LIBRARIES}
344354)
345355# Automatically include headers that might not be declared.
You can’t perform that action at this time.
0 commit comments