abseil-cpp.cmake 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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. set(source_dir ${PROJECT_SOURCE_DIR}/Firestore/third_party/abseil-cpp)
  16. set(binary_dir ${PROJECT_BINARY_DIR}/Firestore/third_party/abseil-cpp)
  17. ExternalProject_Add(
  18. abseil-cpp
  19. DEPENDS googletest
  20. PREFIX "${binary_dir}"
  21. SOURCE_DIR "${source_dir}"
  22. BINARY_DIR "${binary_dir}"
  23. INSTALL_DIR "${FIREBASE_INSTALL_DIR}"
  24. INSTALL_COMMAND ""
  25. TEST_BEFORE_INSTALL ON
  26. CMAKE_ARGS
  27. -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
  28. -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
  29. )