diff options
Diffstat (limited to 'Modules/CMakeFindBinUtils.cmake')
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 688d5d8..851fed9 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -76,7 +76,8 @@ IF(APPLE) ENDIF(APPLE) # if we are on an ELF system, search for chrpath -IF("${CMAKE_EXECUTABLE_FORMAT}" STREQUAL "ELF") +# according to +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) @@ -84,4 +85,4 @@ IF("${CMAKE_EXECUTABLE_FORMAT}" STREQUAL "ELF") FIND_PROGRAM(CMAKE_CHRPATH chrpath) MARK_AS_ADVANCED(CMAKE_CHRPATH) -ENDIF("${CMAKE_EXECUTABLE_FORMAT}" STREQUAL "ELF") +ENDIF("${CMAKE_EXECUTABLE_FORMAT}" STREQUAL "ELF" AND NOT CMAKE_CROSSCOMPILING) |