19 lines
667 B
Diff
19 lines
667 B
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index bdac5af..cedaf6e 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -131,6 +131,13 @@ set(RE2_HEADERS
|
|
|
|
add_library(re2 ${RE2_SOURCES})
|
|
target_compile_features(re2 PUBLIC cxx_std_14)
|
|
+if(APPLE)
|
|
+ set_target_properties(re2 PROPERTIES
|
|
+ INSTALL_RPATH "@loader_path")
|
|
+elseif(UNIX)
|
|
+ set_target_properties(re2 PROPERTIES
|
|
+ INSTALL_RPATH "$ORIGIN")
|
|
+endif()
|
|
target_include_directories(re2 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
|
# CMake gives "set_target_properties called with incorrect number of arguments."
|
|
# errors if we don't quote ${RE2_HEADERS}, so quote it despite prevailing style.
|