summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/NetBSD.cmake
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-10-07 20:06:11 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-26 13:27:29 (GMT)
commit95bd6317bc199135775a2f19ee7890d3e6991e3d (patch)
tree03aa603bb0dc380a0a29184d434013ccb99e4577 /Modules/Platform/NetBSD.cmake
parentc9b8c792719b2c46abf33f0ff0223db51453bf8f (diff)
downloadCMake-95bd6317bc199135775a2f19ee7890d3e6991e3d.zip
CMake-95bd6317bc199135775a2f19ee7890d3e6991e3d.tar.gz
CMake-95bd6317bc199135775a2f19ee7890d3e6991e3d.tar.bz2
RPATH: Record support for $ORIGIN on various *BSD
All of NetBSD, FreeBSD, OpenBSD and DragonFly BSD support `$ORIGIN`, but the last two require `-z origin` as documented at https://lekensteyn.nl/rpath.html The `-z origin` option causes a flag bit to be set and has no effect if the `RPATH` does not contain expandable tokens.
Diffstat (limited to 'Modules/Platform/NetBSD.cmake')
-rw-r--r--Modules/Platform/NetBSD.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/Platform/NetBSD.cmake b/Modules/Platform/NetBSD.cmake
index 1004eb3..a8f4cc8 100644
--- a/Modules/Platform/NetBSD.cmake
+++ b/Modules/Platform/NetBSD.cmake
@@ -6,6 +6,7 @@ set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
+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")