summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorFlorent Castelli <orphis@spotify.com>2014-07-01 18:34:26 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-02 13:42:22 (GMT)
commit591a7388cf8cd26377d901195c9946b51c44cdfb (patch)
tree521f8fba6c8c6a0378987c0bad56f5ff1e64f929 /Modules
parent623123aaa0dce491c3d2a365912ef8c443c8d553 (diff)
downloadCMake-591a7388cf8cd26377d901195c9946b51c44cdfb.zip
CMake-591a7388cf8cd26377d901195c9946b51c44cdfb.tar.gz
CMake-591a7388cf8cd26377d901195c9946b51c44cdfb.tar.bz2
OS X: Only search for install_name_tool if the toolchain has it
When cross compiling, toolchains won't have install_name_tool, which is provided by Xcode and command line tools on OS X. This is a Mach-O specific utility and not required on all platforms.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeFindBinUtils.cmake4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index 829b6ff..dda28bd 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -66,9 +66,7 @@ else()
endif()
-
-# on Apple there really should be install_name_tool
-if(APPLE)
+if(CMAKE_PLATFORM_HAS_INSTALLNAME)
find_program(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
if(NOT CMAKE_INSTALL_NAME_TOOL)