File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -2807,7 +2807,19 @@ macro(build_re2)
28072807 set (RE2_STATIC_LIB
28082808 "${RE2_PREFIX} /lib/${CMAKE_STATIC_LIBRARY_PREFIX} re2${CMAKE_STATIC_LIBRARY_SUFFIX} " )
28092809
2810+ # RE2 (as of 2023-06-01) requires Abseil
2811+ set (RE2_CMAKE_PREFIX "" )
2812+ if (ABSL_VENDORED)
2813+ set (RE2_CMAKE_PREFIX "${ABSL_PREFIX} " )
2814+ endif ()
2815+
2816+ # Convert list to platform-appropriate format
2817+ string (REPLACE ";" ${EP_LIST_SEPARATOR} RE2_PREFIX_PATH_ALT_SEP "${RE2_CMAKE_PREFIX} " )
2818+
28102819 set (RE2_CMAKE_ARGS ${EP_COMMON_CMAKE_ARGS} "-DCMAKE_INSTALL_PREFIX=${RE2_PREFIX} " )
2820+ if (RE2_CMAKE_PREFIX)
2821+ list (APPEND RE2_CMAKE_ARGS "-DCMAKE_PREFIX_PATH=${RE2_PREFIX_PATH_ALT_SEP} " )
2822+ endif ()
28112823
28122824 externalproject_add(re2_ep
28132825 ${EP_COMMON_OPTIONS}
@@ -2823,6 +2835,9 @@ macro(build_re2)
28232835 target_include_directories (re2::re2 BEFORE INTERFACE "${RE2_PREFIX} /include" )
28242836
28252837 add_dependencies (re2::re2 re2_ep)
2838+ if (ABSL_VENDORED)
2839+ add_dependencies (re2_ep absl_ep)
2840+ endif ()
28262841 set (RE2_VENDORED TRUE )
28272842 # Set values so that FindRE2 finds this too
28282843 set (RE2_LIB ${RE2_STATIC_LIB} )
You can’t perform that action at this time.
0 commit comments