Browse Source

BUG: Fix install_name_tool problem on the Mac when a PROJECT(... NONE) is followed by multiple calls to ENABLE_LANGUAGE. Use find_program to set the CMAKE_INSTALL_NAME_TOOL variable so it gets saved in the cache as a full path to the install_name_tool executable rather than a simple set which eventually goes out of scope.

David Cole 17 years ago
parent
commit
b640257884
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Modules/Platform/Darwin.cmake

+ 1 - 1
Modules/Platform/Darwin.cmake

@@ -52,7 +52,7 @@ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
 # and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun)
 # hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex
 IF(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
-  SET(CMAKE_INSTALL_NAME_TOOL install_name_tool)
+  FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL install_name_tool)
 ENDIF(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
 # find installed SDKs
 FILE(GLOB _CMAKE_OSX_SDKS "/Developer/SDKs/*")