2017-03-07 16:10:04 +00:00
|
|
|
option (USE_INTERNAL_RE2_LIBRARY "Set to FALSE to use system re2 library instead of bundled [slower]" ${NOT_UNBUNDLED})
|
2017-02-28 23:49:04 +00:00
|
|
|
|
|
|
|
if (NOT USE_INTERNAL_RE2_LIBRARY)
|
2017-04-01 07:20:54 +00:00
|
|
|
find_library (RE2_LIBRARY re2)
|
|
|
|
find_path (RE2_INCLUDE_DIR NAMES re2/re2.h PATHS ${RE2_INCLUDE_PATHS})
|
2017-02-28 23:49:04 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (RE2_LIBRARY AND RE2_INCLUDE_DIR)
|
2017-04-01 07:20:54 +00:00
|
|
|
set (RE2_ST_LIBRARY ${RE2_LIBRARY})
|
2017-02-28 23:49:04 +00:00
|
|
|
else ()
|
2017-04-01 07:20:54 +00:00
|
|
|
set (USE_INTERNAL_RE2_LIBRARY 1)
|
|
|
|
set (RE2_LIBRARY re2)
|
|
|
|
set (RE2_ST_LIBRARY re2_st)
|
|
|
|
set (USE_RE2_ST 1)
|
2017-02-28 23:49:04 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
message (STATUS "Using re2: ${RE2_INCLUDE_DIR} : ${RE2_LIBRARY}; ${RE2_ST_INCLUDE_DIR} : ${RE2_ST_LIBRARY}")
|