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.
This commit is contained in:
Florent Castelli 2014-07-01 20:34:26 +02:00 committed by Brad King
parent 623123aaa0
commit 591a7388cf
1 changed files with 1 additions and 3 deletions

View File

@ -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)