re2.cmake 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Copyright 2022 Google LLC
  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 RE2)
  16. return()
  17. endif()
  18. # Based on https://github.com/grpc/grpc/blob/v1.44.0/bazel/grpc_deps.bzl
  19. set(commit 8e08f47b11b413302749c0d8b17a1c94777495d5)
  20. ExternalProject_Add(
  21. re2
  22. DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
  23. DOWNLOAD_NAME re2-${commit}.tar.gz
  24. URL https://github.com/google/re2/archive/${commit}.tar.gz
  25. URL_HASH SHA256=319a58a58d8af295db97dfeecc4e250179c5966beaa2d842a82f0a013b6a239b
  26. PREFIX ${PROJECT_BINARY_DIR}
  27. SOURCE_DIR ${PROJECT_BINARY_DIR}/src/re2
  28. CONFIGURE_COMMAND ""
  29. BUILD_COMMAND ""
  30. INSTALL_COMMAND ""
  31. TEST_COMMAND ""
  32. )