summaryrefslogtreecommitdiff
path: root/third_party/re2/src/re2Config.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/re2/src/re2Config.cmake.in')
-rw-r--r--third_party/re2/src/re2Config.cmake.in28
1 files changed, 28 insertions, 0 deletions
diff --git a/third_party/re2/src/re2Config.cmake.in b/third_party/re2/src/re2Config.cmake.in
new file mode 100644
index 000000000..6a177c615
--- /dev/null
+++ b/third_party/re2/src/re2Config.cmake.in
@@ -0,0 +1,28 @@
+# Copyright 2022 The RE2 Authors. All Rights Reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+@PACKAGE_INIT@
+
+include(CMakeFindDependencyMacro)
+
+set_and_check(re2_INCLUDE_DIR ${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@)
+
+if(UNIX)
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
+ find_dependency(Threads REQUIRED)
+endif()
+
+find_dependency(absl REQUIRED)
+
+if(@RE2_USE_ICU@)
+ find_dependency(ICU REQUIRED COMPONENTS uc)
+endif()
+
+check_required_components(re2)
+
+if(TARGET re2::re2)
+ return()
+endif()
+
+include(${CMAKE_CURRENT_LIST_DIR}/re2Targets.cmake)