message(STATUS "CMAKE_SYSTEM_VERSION: ${CMAKE_SYSTEM_VERSION}")
message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
message(STATUS "CMAKE_SKIP_RPATH: ${CMAKE_SKIP_RPATH}")
+message(STATUS "CMAKE_SKIP_INSTALL_RPATH: ${CMAKE_SKIP_INSTALL_RPATH}")
message(STATUS "CMAKE_INSTALL_RPATH: ${CMAKE_INSTALL_RPATH}")
message(STATUS "CMAKE_VERBOSE_MAKEFILE: ${CMAKE_VERBOSE_MAKEFILE}")
message(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}")
--- /dev/null
+# Disable RPATH for install tree by default.
+#
+# PreLoad is used to change the default, since CMakeLists.txt will already have
+# the default, and it will NO.
+if (NOT DEFINED CMAKE_SKIP_INSTALL_RPATH)
+ set(CMAKE_SKIP_INSTALL_RPATH ON CACHE STRING "" FORCE)
+endif()
dllpath = os.path.join(prefix, "lib")
else:
prefix = "/usr/local"
-exec_cmd('cmake -DCMAKE_INSTALL_PREFIX="%s" ..' % prefix, True)
+exec_cmd('cmake -DCMAKE_SKIP_INSTALL_RPATH=OFF -DCMAKE_INSTALL_PREFIX="%s" ..' % prefix, True)
exec_cmd('cmake --build . --target install', True)
config_backup()
os.environ["CMAKE_PREFIX_PATH"] = os.path.join(prefix, "lib/cmake/libevent")
print("[test-export] test for install tree(in non-system-wide path)")
exec_cmd("cmake --build . --target uninstall", True)
tempdir = tempfile.TemporaryDirectory()
-cmd = 'cmake -DCMAKE_INSTALL_PREFIX="%s" ..' % tempdir.name
+cmd = 'cmake -DCMAKE_SKIP_INSTALL_RPATH=OFF -DCMAKE_INSTALL_PREFIX="%s" ..' % tempdir.name
exec_cmd(cmd, True)
exec_cmd("cmake --build . --target install", True)
config_backup()