summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3a09dd9f5..7c315cbe4b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -445,6 +445,9 @@ if (APPLE)
else(UNIX)
if(NOT DEFINED CMAKE_INSTALL_RPATH)
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
+ if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,origin")
+ endif()
endif(NOT DEFINED CMAKE_INSTALL_RPATH)
endif()