MantisBT - CMake
View Issue Details
0015000CMakeModulespublic2014-07-01 14:332015-01-05 08:39
Florent Castelli 
Brad King 
normalmajoralways
closedfixed 
AndroidOSX10.9.3
CMake 3.0 
CMake 3.1CMake 3.1 
0015000: CMakeFindBinUtils always search for install_name_tool even when cross compiling on OSX
When cross compiling (in my case for Android) from a Mac, CMakeFindBinUtils.cmake searches for a tool called "install_name_tool" required to make changes to Mach-O binaries (which is totally irrelevant to Android dev).
This tool might not be installed (it comes with xcode or command line tools on OSX) and thus CMake will fail to generate a project (it issues a fatal error).

This "error" is so pervasive that some android toolchain files actually ensure that install_name_tool is available just to pass this check.

Fix would require to change the if(APPLE) on line 71 to if(CMAKE_PLATFORM_HAS_INSTALLNAME) which is set in other files when the tool is provided by the toolchain.
No tags attached.
patch 0001-Only-search-for-install_name_tool-if-the-toolchain-h.patch (973) 2014-07-01 14:40
https://public.kitware.com/Bug/file/5182/0001-Only-search-for-install_name_tool-if-the-toolchain-h.patch
Issue History
2014-07-01 14:33Florent CastelliNew Issue
2014-07-01 14:40Florent CastelliFile Added: 0001-Only-search-for-install_name_tool-if-the-toolchain-h.patch
2014-07-01 14:40Florent CastelliNote Added: 0036300
2014-07-02 09:19Brad KingNote Added: 0036303
2014-07-02 09:19Brad KingAssigned To => Brad King
2014-07-02 09:19Brad KingStatusnew => resolved
2014-07-02 09:19Brad KingResolutionopen => fixed
2014-07-02 09:19Brad KingFixed in Version => CMake 3.1
2014-07-02 09:19Brad KingTarget Version => CMake 3.1
2015-01-05 08:39Robert MaynardNote Added: 0037580
2015-01-05 08:39Robert MaynardStatusresolved => closed

Notes
(0036300)
Florent Castelli   
2014-07-01 14:40   
Patched fixing the issue attached.
(0036303)
Brad King   
2014-07-02 09:19   
For reference, the mailing list thread is here:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10421 [^]

I've applied that patch:

 OS X: Only search for install_name_tool if the toolchain has it
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3012d20 [^]

Thanks!
(0037580)
Robert Maynard   
2015-01-05 08:39   
Closing resolved issues that have not been updated in more than 4 months