c-ares.cmake 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copyright 2018 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. if(TARGET c-ares)
  16. return()
  17. endif()
  18. # The gRPC build fails if c-ares is not present in its expected location so
  19. # this ExternalProject unpacks itself inside the gRPC source tree. CMake clears
  20. # the SOURCE_DIR when unpacking so this must come after the grpc
  21. # ExternalProject.
  22. ExternalProject_Add(
  23. c-ares
  24. DEPENDS
  25. grpc-download
  26. DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
  27. URL https://github.com/c-ares/c-ares/archive/cares-1_14_0.tar.gz
  28. URL_HASH SHA256=62dd12f0557918f89ad6f5b759f0bf4727174ae9979499f5452c02be38d9d3e8
  29. PREFIX ${PROJECT_BINARY_DIR}
  30. SOURCE_DIR ${PROJECT_BINARY_DIR}/src/grpc/third_party/cares/cares
  31. CONFIGURE_COMMAND ""
  32. BUILD_COMMAND ""
  33. INSTALL_COMMAND ""
  34. TEST_COMMAND ""
  35. )