|
|
@@ -76,7 +76,8 @@ IF(APPLE)
|
|
|
ENDIF(APPLE)
|
|
|
|
|
|
# if we are on an ELF system, search for chrpath
|
|
|
-# according to
|
|
|
+# 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)
|