OS X: Search system SDKs for frameworks

In Modules/Platform/Darwin.cmake set CMAKE_SYSTEM_FRAMEWORK_PATH to
include framework directories from inside the system SDK corresponding
to CMAKE_OSX_SYSROOT.

Suggested-by: Sean McBride <sean@rogue-research.com>
This commit is contained in:
Brad King 2013-09-27 10:13:53 -04:00
parent 6ed8504ea5
commit 1fce189e53
1 changed files with 9 additions and 0 deletions

View File

@ -294,6 +294,15 @@ endif()
# set up the default search directories for frameworks
set(CMAKE_SYSTEM_FRAMEWORK_PATH
~/Library/Frameworks
)
if(_CMAKE_OSX_SYSROOT_PATH)
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
${_CMAKE_OSX_SYSROOT_PATH}/Library/Frameworks
${_CMAKE_OSX_SYSROOT_PATH}/Network/Library/Frameworks
${_CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks
)
endif()
list(APPEND CMAKE_SYSTEM_FRAMEWORK_PATH
/Library/Frameworks
/Network/Library/Frameworks
/System/Library/Frameworks)