diff options
author | Gil <mcg@google.com> | 2018-01-01 21:00:32 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-01 21:00:32 -0800 |
commit | 13da48d8a4fcdfe288fa15c788c59e7f54edf42c (patch) | |
tree | 059bbfffe76ff01eb8241d468e23b22b68001d69 /CMakeLists.txt | |
parent | 412e759a19117974cca18e86ea44742ae0dec659 (diff) |
Build FirebaseCore from CMake (#594)
* Don't bother specifying a download directory to CMake ExternalProject
* Teach CMake to build pure Xcode projects as dependencies
This allows downstream code (like log_apple.mm) to consume this for
testing within the CMake build without requiring a CMake-native build
for these components.
This makes integrating these components into the cmake build essentially
free from the point of view of the consumed component.
* Get the CMake build semi-working on Linux again
Many prebuilt versions of cmake on Linux lack the ability to download
over https so use git to get googletest.
Don't attempt to build FirebaseCore on Linux; there's no xcodebuild.
Note the build is still ultimately broken because we don't yet have an
alternative to arc4random on Linux but at least this is no more broken
than it was before.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 63e1a39..52a4376 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,15 +22,22 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() +if(APPLE) + # When building on the apple platform certain Objective-C++ classes bridge + # back into other Firebase Cocoapods. This requires shelling out to xcodebuild + # to verify the built frameworks are up-to-date. You can disable this to speed + # up the build. + option(BUILD_PODS, "Always build dependent cocoapods." ON) +endif(APPLE) + list(INSERT CMAKE_MODULE_PATH 0 ${PROJECT_SOURCE_DIR}/cmake) -# External Projects install into this prefix and download into the source tree -# to avoid re-downloading repeatedly during development. -set(FIREBASE_INSTALL_DIR "${PROJECT_BINARY_DIR}/usr") -set(FIREBASE_DOWNLOAD_DIR "${PROJECT_SOURCE_DIR}/.downloads") +set(FIREBASE_INSTALL_DIR ${PROJECT_BINARY_DIR}) enable_testing() +include(external/FirebaseCore) + include(external/googletest) include(external/leveldb) include(external/abseil-cpp) |