1 FIND_PATH(SYSTEM_RE2_INCLUDE_DIR re2/re2.h)
2 IF (SYSTEM_RE2_INCLUDE_DIR)
3 MESSAGE(STATUS "Found RE2 include dir")
4 FIND_LIBRARY(SYSTEM_RE2_LIBRARY re2)
5 IF (SYSTEM_RE2_LIBRARY)
6 MESSAGE(STATUS "Found RE2 library")
7 SET(RE2_INCLUDE_DIR ${SYSTEM_RE2_INCLUDE_DIR})
8 SET(RE2_LIBRARY ${SYSTEM_RE2_LIBRARY})
10 MESSAGE(FATAL_ERROR "Found RE2 headers, but not the library")
13 MESSAGE(STATUS "Did not find system RE2")