summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/DragonFly.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Platform/DragonFly.cmake')
-rw-r--r--Modules/Platform/DragonFly.cmake4
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,")