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 () + +