mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
ENH: Use builtin chrpath instead of relinking ELF targets
- Add cmSystemTools::ChangeRPath method
- Add undocumented file(CHRPATH) command
- When installing use file(CHRPATH) to change the rpath
instead of relinking
- Remove CMAKE_CHRPATH lookup from CMakeFindBinUtils
- Remove CMAKE_USE_CHRPATH option since this should
always work
This commit is contained in:
@@ -74,16 +74,3 @@ IF(APPLE)
|
||||
|
||||
MARK_AS_ADVANCED(CMAKE_INSTALL_NAME_TOOL)
|
||||
ENDIF(APPLE)
|
||||
|
||||
# if we are on an ELF system, search for chrpath
|
||||
# according to the binutils mailing list chrpath has problems when cross compiling
|
||||
# i.e. if the target has different endianness than the host
|
||||
IF("${CMAKE_EXECUTABLE_FORMAT}" STREQUAL "ELF" AND NOT CMAKE_CROSSCOMPILING)
|
||||
# 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 CMAKE_USE_CHRPATH)
|
||||
ENDIF("${CMAKE_EXECUTABLE_FORMAT}" STREQUAL "ELF" AND NOT CMAKE_CROSSCOMPILING)
|
||||
|
||||
Reference in New Issue
Block a user