OS X: Look for Xcode 5 platform-specific Frameworks
The Xcode 5 platform specific framework locations differ from the Xcode 6 ones. Look first for the Xcode 6 ones, then for iOS Xcode 5 ones and last for the Xcode 5 OS X ones. For reference, the XCTest.framework is located as follows: Xcode511.app/Contents/Developer/Library/Frameworks/XCTest.framework Xcode511.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/Developer/Library/Frameworks/XCTest.framework Xcode511.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/Developer/Library/Frameworks/XCTest.framework Xcode601.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework Xcode601.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework Xcode601.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
This commit is contained in:
parent
64e97edad7
commit
52642b466e
|
@ -167,12 +167,20 @@ if(_CMAKE_OSX_SYSROOT_PATH)
|
||||||
${_CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks
|
${_CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks
|
||||||
)
|
)
|
||||||
# add platform developer framework path if exists
|
# add platform developer framework path if exists
|
||||||
get_filename_component(_CMAKE_OSX_PLATFORM_FRAMEWORK_PATH
|
foreach(_path
|
||||||
${_CMAKE_OSX_SYSROOT_PATH}/../../Library/Frameworks ABSOLUTE)
|
# Xcode 6
|
||||||
if(IS_DIRECTORY ${_CMAKE_OSX_PLATFORM_FRAMEWORK_PATH})
|
${_CMAKE_OSX_SYSROOT_PATH}/../../Library/Frameworks
|
||||||
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
|
# Xcode 5 iOS
|
||||||
${_CMAKE_OSX_PLATFORM_FRAMEWORK_PATH})
|
${_CMAKE_OSX_SYSROOT_PATH}/Developer/Library/Frameworks
|
||||||
|
# Xcode 5 OSX
|
||||||
|
${_CMAKE_OSX_SYSROOT_PATH}/../../../../../Library/Frameworks
|
||||||
|
)
|
||||||
|
get_filename_component(_abolute_path "${_path}" ABSOLUTE)
|
||||||
|
if(EXISTS "${_abolute_path}")
|
||||||
|
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH "${_abolute_path}")
|
||||||
|
break()
|
||||||
endif()
|
endif()
|
||||||
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
|
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
|
||||||
/Library/Frameworks
|
/Library/Frameworks
|
||||||
|
|
Loading…
Reference in New Issue