Fix BuildDepends test to work with Xcode 4

ppc tools are no longer available in the Xcode 4 installation.
Eliminate the use of the hard-coded 'ppc' in the test when
running on Snow Leopard or later.
This commit is contained in:
David Cole 2011-07-15 15:34:17 -04:00
parent 923b030ed9
commit c050c592ee
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,11 @@ if(APPLE)
# only use multi-arch if the sysroot exists on this machine
if(EXISTS "${CMAKE_OSX_SYSROOT}")
set(CMAKE_OSX_ARCHITECTURES "ppc;i386")
if(NOT "${DARWIN_MAJOR_VERSION}.${DARWIN_MINOR_VERSION}" VERSION_LESS 10.0)
# Snow Leopard or later, use modern architectures as defaults
# Arch 'ppc' no longer works: tools no longer available starting with Xcode 4
set(CMAKE_OSX_ARCHITECTURES i386 x86_64)
endif()
endif(EXISTS "${CMAKE_OSX_SYSROOT}")
endif(APPLE)