From 591a7388cf8cd26377d901195c9946b51c44cdfb Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Tue, 1 Jul 2014 20:34:26 +0200 Subject: [PATCH] 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. --- Modules/CMakeFindBinUtils.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 829b6ffd4..dda28bdbb 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)