diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 2cb7696..43f76f7 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -75,3 +75,13 @@ IF(APPLE) MARK_AS_ADVANCED(CMAKE_INSTALL_NAME_TOOL) ENDIF(APPLE) +IF(UNIX AND NOT APPLE AND NOT WIN32) + # on ELF platforms there might be chrpath, which works similar to install_name_tool + OPTION(CMAKE_USE_CHRPATH "Enable this to use chrpath if available" OFF) + + FIND_PROGRAM(CMAKE_CHRPATH chrpath PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) + FIND_PROGRAM(CMAKE_CHRPATH chrpath) + + MARK_AS_ADVANCED(CMAKE_CHRPATH) +ENDIF(UNIX AND NOT APPLE AND NOT WIN32) + |