File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -119,13 +119,22 @@ include(GNUInstallDirs)
119119# the OSX RPATH settings have been updated per recommendations found
120120# in the CMake Wiki:
121121# http://www.cmake.org/Wiki/CMake_RPATH_handling#Mac_OS_X_and_the_RPATH
122- set (CMAKE_MACOSX_RPATH ON )
123- set (CMAKE_SKIP_BUILD_RPATH FALSE )
124- set (CMAKE_BUILD_WITH_INSTALL_RPATH FALSE )
122+ option (CMAKE_MACOSX_RPATH "Enable macOS RPATH" ON )
123+ message (STATUS "Enable macOS RPATH: ${CMAKE_MACOSX_RPATH} " )
124+ option (CMAKE_SKIP_BUILD_RPATH "Skip build-time RPATH" OFF )
125+ message (STATUS "Skip build-time RPATH: ${CMAKE_SKIP_BUILD_RPATH} " )
126+ option (CMAKE_BUILD_WITH_INSTALL_RPATH "Build with install RPATH" OFF )
127+ message (STATUS "Build with install RPATH: ${CMAKE_BUILD_WITH_INSTALL_RPATH} " )
128+
125129list (FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES ${CMAKE_INSTALL_FULL_LIBDIR} isSystemDir)
126- if ("${isSystemDir} " STREQUAL "-1" )
127- set (CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR} )
128- set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )
130+
131+ if ("${isSystemDir} " STREQUAL "-1" )
132+ if (${CMAKE_INSTALL_FULL_LIBDIR} )
133+ set (CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR} )
134+ endif ()
135+ message (STATUS "Install RPATH: ${CMAKE_INSTALL_RPATH} " )
136+ option (CMAKE_INSTALL_RPATH_USE_LINK_PATH "Use link path for RPATH" TRUE )
137+ message (STATUS "Install RPATH use link path: ${CMAKE_INSTALL_RPATH_USE_LINK_PATH} " )
129138endif ()
130139
131140
You can’t perform that action at this time.
0 commit comments