summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-04-10 19:19:31 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-04-10 19:19:31 (GMT)
commit104f7cc00a22b3f2400293b99814682fe70e5852 (patch)
tree281585e33e74b8699ac5bd1eeba81c3c903b6195 /Modules
parent082fba06623463328ecd6b213b4143532d6fe4aa (diff)
parent6190415436bd00de65cd702e5e5e74061d0c8462 (diff)
downloadCMake-104f7cc00a22b3f2400293b99814682fe70e5852.zip
CMake-104f7cc00a22b3f2400293b99814682fe70e5852.tar.gz
CMake-104f7cc00a22b3f2400293b99814682fe70e5852.tar.bz2
Merge topic 'osx-search-paths'
6190415 OS X: Mark find_program results as advanced d9edf46 OS X: Use correct extra path when searching for applicaton bundles (#13066) 98b9a7f OS X: Use OSX_DEVELOPER_ROOT for app search path (#13066)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Darwin.cmake20
1 files changed, 17 insertions, 3 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index c4b5635..f9d37c3 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -56,6 +56,7 @@ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
# 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)
FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL install_name_tool)
+ MARK_AS_ADVANCED(CMAKE_INSTALL_NAME_TOOL)
ENDIF(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
# Set the assumed (Pre 10.5 or Default) location of the developer tools
@@ -63,6 +64,7 @@ SET(OSX_DEVELOPER_ROOT "/Developer")
# Use the xcode-select tool if it's available (Xcode >= 3.0 installations)
FIND_PROGRAM(CMAKE_XCODE_SELECT xcode-select)
+MARK_AS_ADVANCED(CMAKE_XCODE_SELECT)
IF(CMAKE_XCODE_SELECT)
EXECUTE_PROCESS(COMMAND ${CMAKE_XCODE_SELECT} "-print-path"
OUTPUT_VARIABLE OSX_DEVELOPER_ROOT
@@ -239,10 +241,22 @@ SET(CMAKE_SYSTEM_FRAMEWORK_PATH
# default to searching for application bundles first
SET(CMAKE_FIND_APPBUNDLE FIRST)
# set up the default search directories for application bundles
+SET(_apps_paths)
+FOREACH(_path
+ "~/Applications"
+ "/Applications"
+ "${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+
+ "${OSX_DEVELOPER_ROOT}/Applications" # pre-4.3
+ )
+ GET_FILENAME_COMPONENT(_apps "${_path}" ABSOLUTE)
+ IF(EXISTS "${_apps}")
+ LIST(APPEND _apps_paths "${_apps}")
+ ENDIF()
+ENDFOREACH()
+LIST(REMOVE_DUPLICATES _apps_paths)
SET(CMAKE_SYSTEM_APPBUNDLE_PATH
- ~/Applications
- /Applications
- /Developer/Applications)
+ ${_apps_paths})
+UNSET(_apps_paths)
INCLUDE(Platform/UnixPaths)
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH