@@ -68,23 +68,6 @@ if(DEFINED ANDROID_NDK)
68
68
set (ANDROID 1)
69
69
endif ()
70
70
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
-
88
71
# Set directories needed by the Firebase subprojects
89
72
# Directory to store generated files.
90
73
set (FIREBASE_GEN_FILE_DIR ${CMAKE_BINARY_DIR} /generated )
@@ -113,8 +96,15 @@ set(FIREBASE_DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/downloads)
113
96
# Run the CMake build logic that will download all the external dependencies.
114
97
download_external_sources()
115
98
116
- # Disable the Flatbuffer build tests
99
+ # Disable the Flatbuffer build tests, install and flathash
117
100
set (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 ()
118
108
119
109
# Add flatbuffers as a subdirectory, and set the directory variables for it,
120
110
# so that the sub Firebase projects can depend upon it if necessary.
@@ -230,7 +220,6 @@ if(ANDROID OR IOS)
230
220
endif ()
231
221
232
222
set (FLATBUFFERS_FLATC_EXECUTABLE ${firebase_external_flatc} CACHE STRING "" )
233
- set (FLATBUFFERS_BUILD_FLATC OFF CACHE BOOL "" )
234
223
235
224
# Setup the flatc custom build target.
236
225
# These commands are executed from within the currect context, which has set
@@ -279,6 +268,11 @@ endif()
279
268
# then refer to.
280
269
set (FIREBASE_CPP_SDK_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR} )
281
270
271
+ include (binary_to_array)
272
+ include (firebase_cpp_gradle)
273
+
274
+ add_subdirectory (ios_pod)
275
+
282
276
# If we're building tests, we need to include the 'testing' folder before any
283
277
# of the tests actually get built.
284
278
if (FIREBASE_CPP_BUILD_TESTS)
0 commit comments