CMake/Modules/Platform/DragonFly.cmake
Peter Wu 95bd6317bc 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.
2018-10-26 09:27:29 -04:00

10 lines
388 B
CMake

# DragonFly BSD was forked from FreeBSD and is still very close to it
# http://www.dragonflybsd.org
# 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,")