CMakeLists.txt 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright 2017 Google
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # Superbuild for Firebase
  15. cmake_minimum_required(VERSION 2.8.11)
  16. project(firebase C CXX)
  17. option(WITH_ASAN "Build with Address Sanitizer" OFF)
  18. option(WITH_TSAN "Build with Thread Sanitizer (mutually exculsive with other sanitizers)" OFF)
  19. option(WITH_UBSAN "Build with Undefined Behavior sanitizer" OFF)
  20. # If no build type is specified, make it a debug build
  21. if(NOT CMAKE_BUILD_TYPE)
  22. set(CMAKE_BUILD_TYPE Debug)
  23. endif()
  24. if(APPLE)
  25. # When building on the apple platform certain Objective-C++ classes bridge
  26. # back into other Firebase Cocoapods. This requires shelling out to xcodebuild
  27. # to verify the built frameworks are up-to-date. You can disable this to speed
  28. # up the build.
  29. option(BUILD_PODS, "Always build dependent cocoapods." ON)
  30. endif(APPLE)
  31. list(INSERT CMAKE_MODULE_PATH 0 ${PROJECT_SOURCE_DIR}/cmake)
  32. set(FIREBASE_INSTALL_DIR ${PROJECT_BINARY_DIR})
  33. enable_testing()
  34. include(external/FirebaseCore)
  35. include(external/googletest)
  36. include(external/leveldb)
  37. include(external/grpc)
  38. include(external/protobuf)
  39. include(external/nanopb)
  40. include(external/firestore)