summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-10-07 20:03:18 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-26 13:26:47 (GMT)
commitc9b8c792719b2c46abf33f0ff0223db51453bf8f (patch)
treed2dc7e17e8a02454989c9257ef8b2cb513517f0b
parent6114d85a7db0571bfade96a710f34a01bb2037c8 (diff)
downloadCMake-c9b8c792719b2c46abf33f0ff0223db51453bf8f.zip
CMake-c9b8c792719b2c46abf33f0ff0223db51453bf8f.tar.gz
CMake-c9b8c792719b2c46abf33f0ff0223db51453bf8f.tar.bz2
RPATH: Record support for $ORIGIN on Haiku and Solaris
Solaris 7 and Haiku (since 2013) both support $ORIGIN as documented at https://lekensteyn.nl/rpath.html
-rw-r--r--Modules/Platform/Haiku.cmake1
-rw-r--r--Modules/Platform/SunOS-GNU.cmake1
2 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Platform/Haiku.cmake b/Modules/Platform/Haiku.cmake
index dfc2664..7e0af61 100644
--- a/Modules/Platform/Haiku.cmake
+++ b/Modules/Platform/Haiku.cmake
@@ -11,6 +11,7 @@ set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
+set(CMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN "\$ORIGIN")
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
diff --git a/Modules/Platform/SunOS-GNU.cmake b/Modules/Platform/SunOS-GNU.cmake
index 485f235..47334d6 100644
--- a/Modules/Platform/SunOS-GNU.cmake
+++ b/Modules/Platform/SunOS-GNU.cmake
@@ -11,6 +11,7 @@ set(__SUNOS_COMPILER_GNU 1)
macro(__sunos_compiler_gnu lang)
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-R")
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":")
+ set(CMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN "\$ORIGIN")
set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,-h")
# Initialize C link type selection flags. These flags are used when