[cmake-developers] [PATCH] Only search for install_name_tool if the toolchain has it
Florent Castelli
florent.castelli at gmail.com
Tue Jul 1 14:48:27 EDT 2014
When cross compiling, toolchains won't have install_name_tool,
which is provided by Xcode and command line tools on OSX.
This is a Mach-O specific utility and not required on all platforms.
---
Modules/CMakeFindBinUtils.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index 829b6ff..5b5bda8 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -68,7 +68,7 @@ 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)
--
2.0.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Only-search-for-install_name_tool-if-the-toolchain-h.patch
Type: application/octet-stream
Size: 973 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140701/9e9c2a4a/attachment.obj>
More information about the cmake-developers
mailing list