@@ -68,23 +68,6 @@ if(DEFINED ANDROID_NDK)
6868 set (ANDROID 1)
6969endif ()
7070
71- if (DEFINED CMAKE_TOOLCHAIN_FILE AND NOT ANDROID)
72- # Force using the toolchain file, as otherwise it loads it later in the
73- # process, after several of the checks against it have failed.
74- if (IS_ABSOLUTE ${CMAKE_TOOLCHAIN_FILE} )
75- message ("Using Toolchain File: ${CMAKE_TOOLCHAIN_FILE} " )
76- include ("${CMAKE_TOOLCHAIN_FILE} " )
77- else ()
78- message ("Using Toolchain File: ${CMAKE_BINARY_DIR} /${CMAKE_TOOLCHAIN_FILE} " )
79- include ("${CMAKE_BINARY_DIR} /${CMAKE_TOOLCHAIN_FILE} " )
80- endif ()
81- endif ()
82-
83- # We're on iOS if the system root is set to "iphone" or some variant.
84- if ("${CMAKE_OSX_SYSROOT} " MATCHES "iphone" )
85- set (IOS TRUE CACHE BOOL "Target platform is iOS." )
86- endif ()
87-
8871# Set directories needed by the Firebase subprojects
8972# Directory to store generated files.
9073set (FIREBASE_GEN_FILE_DIR ${CMAKE_BINARY_DIR} /generated )
@@ -113,8 +96,15 @@ set(FIREBASE_DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/downloads)
11396# Run the CMake build logic that will download all the external dependencies.
11497download_external_sources()
11598
116- # Disable the Flatbuffer build tests
99+ # Disable the Flatbuffer build tests, install and flathash
117100set (FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "" )
101+ set (FLATBUFFERS_INSTALL OFF CACHE BOOL "" )
102+ set (FLATBUFFERS_FLATHASH OFF CACHE BOOL "" )
103+
104+ # Disable buliding flatc if cross compiling
105+ if (IOS OR ANDROID)
106+ set (FLATBUFFERS_BUILD_FLATC OFF CACHE BOOL "" )
107+ endif ()
118108
119109# Add flatbuffers as a subdirectory, and set the directory variables for it,
120110# so that the sub Firebase projects can depend upon it if necessary.
@@ -230,7 +220,6 @@ if(ANDROID OR IOS)
230220 endif ()
231221
232222 set (FLATBUFFERS_FLATC_EXECUTABLE ${firebase_external_flatc} CACHE STRING "" )
233- set (FLATBUFFERS_BUILD_FLATC OFF CACHE BOOL "" )
234223
235224 # Setup the flatc custom build target.
236225 # These commands are executed from within the currect context, which has set
@@ -279,6 +268,11 @@ endif()
279268# then refer to.
280269set (FIREBASE_CPP_SDK_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR} )
281270
271+ include (binary_to_array)
272+ include (firebase_cpp_gradle)
273+
274+ add_subdirectory (ios_pod)
275+
282276# If we're building tests, we need to include the 'testing' folder before any
283277# of the tests actually get built.
284278if (FIREBASE_CPP_BUILD_TESTS)
0 commit comments