OS X: Warn about known SDK breakage by Xcode 3.2.6

Xcode 3.2.6 is known to break the SDK Library/Frameworks layout.
Detect and warn about this case to tell users to fix their system.

Reported-by: Matthew Brett <matthew.brett@gmail.com>
This commit is contained in:
Brad King 2012-11-08 09:06:07 -05:00
parent f058b27547
commit 720d790f16
1 changed files with 17 additions and 0 deletions

View File

@ -263,6 +263,23 @@ set(CMAKE_SYSTEM_FRAMEWORK_PATH
/Network/Library/Frameworks
/System/Library/Frameworks)
# Warn about known system mis-configuration case.
if(CMAKE_OSX_SYSROOT)
get_property(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
if(NOT _IN_TC AND
NOT IS_SYMLINK "${CMAKE_OSX_SYSROOT}/Library/Frameworks"
AND IS_SYMLINK "${CMAKE_OSX_SYSROOT}/Library/Frameworks/Frameworks")
message(WARNING "The SDK Library/Frameworks path\n"
" ${CMAKE_OSX_SYSROOT}/Library/Frameworks\n"
"is not set up correctly on this system. "
"This is known to occur when installing Xcode 3.2.6:\n"
" http://bugs.python.org/issue14018\n"
"The problem may cause build errors that report missing system frameworks. "
"Fix your SDK symlinks to resolve this issue and avoid this warning."
)
endif()
endif()
# default to searching for application bundles first
if(NOT DEFINED CMAKE_FIND_APPBUNDLE)
set(CMAKE_FIND_APPBUNDLE FIRST)