From b33e1c5cc36505a9dfbd193142890bea9120bd82 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 14 Jan 2008 19:02:30 -0500 Subject: [PATCH] BUG: according to the binutils mailing list chrpath doesn't work when cross compiling Alex --- Modules/CMakeFindBinUtils.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 688d5d81f..851fed989 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)