blob: e42f291e55bf1c9787486ffe7b47f37e1f57166b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
diff --git a/src/arrow/cpp/cmake_modules/Findre2.cmake b/src/arrow/cpp/cmake_modules/Findre2.cmake
new file mode 100644
index 00000000000..6f39de75461
--- /dev/null
+++ b/src/arrow/cpp/cmake_modules/Findre2.cmake
@@ -0,0 +1,16 @@
+FIND_PATH(SYSTEM_RE2_INCLUDE_DIR re2/re2.h)
+IF (SYSTEM_RE2_INCLUDE_DIR)
+ MESSAGE(STATUS "Found RE2 include dir")
+ FIND_LIBRARY(SYSTEM_RE2_LIBRARY re2)
+ IF (SYSTEM_RE2_LIBRARY)
+ MESSAGE(STATUS "Found RE2 library")
+ SET(RE2_INCLUDE_DIR ${SYSTEM_RE2_INCLUDE_DIR})
+ SET(RE2_LIBRARY ${SYSTEM_RE2_LIBRARY})
+ ELSE ()
+ MESSAGE(FATAL_ERROR "Found RE2 headers, but not the library")
+ ENDIF ()
+ELSE ()
+ MESSAGE(STATUS "Did not find system RE2")
+ENDIF ()
+
+
|