diff options
Diffstat (limited to '')
-rw-r--r-- | cmake/ConfigureRPATH.cmake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/ConfigureRPATH.cmake b/cmake/ConfigureRPATH.cmake new file mode 100644 index 0000000..9af2af8 --- /dev/null +++ b/cmake/ConfigureRPATH.cmake @@ -0,0 +1,18 @@ +# RPATH configuration +set(CMAKE_SKIP_BUILD_RPATH FALSE) +set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) +if (APPLE) + file(RELATIVE_PATH FRAMEWORK_PATH ${CMAKE_INSTALL_FULL_BINDIR} ${CMAKE_INSTALL_FULL_LIBDIR}) + set(CMAKE_INSTALL_RPATH "@loader_path/${FRAMEWORK_PATH}") +else (APPLE) + if (NOT FREEBSD) + set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:\$ORIGIN/..") + option(WITH_ADD_PLUGIN_TO_RPATH "Add extension and plugin path to RPATH" OFF) + if (WITH_ADD_PLUGIN_TO_RPATH) + set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${FREERDP_EXTENSION_REL_PATH}:\$ORIGIN/../${FREERDP_PLUGIN_PATH}:${CMAKE_INSTALL_RPATH}") + endif() + endif() +endif(APPLE) + + |