diff options
author | Jens Verwiebe <info@jensverwiebe.de> | 2013-09-14 16:11:26 +0400 |
---|---|---|
committer | Jens Verwiebe <info@jensverwiebe.de> | 2013-09-14 16:11:26 +0400 |
commit | 809cb5e478a881b62896fbb0050efded9b6939b6 (patch) | |
tree | 83e44265e1903b37fa177791da8343e7027f1bfa /CMakeLists.txt | |
parent | 811669c14e7b46a8e1fd00aa05855ba2cf3ab9c4 (diff) |
OSX/cmake: don't try get xcode path from xcode before 4.3, developer dir was not bundled in this case
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fd21a48f37..5d30d29cf27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -326,9 +326,11 @@ if(APPLE) execute_process(COMMAND xcode-select --print-path OUTPUT_VARIABLE XCODE_CHECK OUTPUT_STRIP_TRAILING_WHITESPACE) string(REPLACE "/Contents/Developer" "" XCODE_BUNDLE ${XCODE_CHECK}) # truncate to bundlepath in any case message(STATUS "Xcode-bundle : " ${XCODE_BUNDLE}) - string(SUBSTRING "${XCODE_CHECK}" 14 6 DP_NAME) # reduce to XCode name without dp extension - if(${DP_NAME} MATCHES Xcode5) - set(XCODE_VERSION 5) + if(${XCODE_VERSION} VERSION_GREATER 4.2) # earlier xcode has no bundled developer dir, no sense in getting xcode path from + string(SUBSTRING "${XCODE_CHECK}" 14 6 DP_NAME) # reduce to XCode name without dp extension + if(${DP_NAME} MATCHES Xcode5) + set(XCODE_VERSION 5) + endif() endif() if(${CMAKE_GENERATOR} MATCHES "Xcode") |