diff options
author | Peter Wu <peter@lekensteyn.nl> | 2018-10-07 20:06:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-10-26 13:27:29 (GMT) |
commit | 95bd6317bc199135775a2f19ee7890d3e6991e3d (patch) | |
tree | 03aa603bb0dc380a0a29184d434013ccb99e4577 /Modules/Platform/DragonFly.cmake | |
parent | c9b8c792719b2c46abf33f0ff0223db51453bf8f (diff) | |
download | CMake-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/DragonFly.cmake')
-rw-r--r-- | Modules/Platform/DragonFly.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/Platform/DragonFly.cmake b/Modules/Platform/DragonFly.cmake index c22677b..12e5f3c 100644 --- a/Modules/Platform/DragonFly.cmake +++ b/Modules/Platform/DragonFly.cmake @@ -3,3 +3,7 @@ # see http://archive.netbsd.se/?ml=dfbsd-users&a=2007-07&m=4678361 include(Platform/FreeBSD) + +# DragonFly BSD requires -z origin to enable $ORIGIN expansion in RPATH. +# This is not required for FreeBSD since 10.2-RELEASE. +set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-z,origin,-rpath,") |