firestore.cmake 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. include(ExternalProject)
  15. ExternalProject_Add(
  16. Firestore
  17. DEPENDS
  18. FirebaseCore
  19. googletest
  20. leveldb
  21. grpc
  22. nanopb
  23. # Lay the binary directory out as if this were a subproject. This makes it
  24. # possible to build and test in it directly.
  25. PREFIX ${PROJECT_BINARY_DIR}/external/Firestore
  26. SOURCE_DIR ${PROJECT_SOURCE_DIR}/Firestore
  27. BINARY_DIR ${PROJECT_BINARY_DIR}/Firestore
  28. CMAKE_ARGS
  29. -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
  30. -DCMAKE_INSTALL_PREFIX:PATH=${FIREBASE_INSTALL_DIR}
  31. -DWITH_ASAN:BOOL=${WITH_ASAN}
  32. -DWITH_TSAN:BOOL=${WITH_TSAN}
  33. -DWITH_UBSAN:BOOL=${WITH_UBSAN}
  34. BUILD_ALWAYS ON
  35. INSTALL_COMMAND ""
  36. TEST_BEFORE_INSTALL ON
  37. )