Wrapping SET(CMAKE_OSX_ARCHITECTURES "i386;ppc") to compile on older version than Snow Leopard

This commit is contained in:
Jean-Manuel Caba 2009-09-30 21:49:33 +00:00
parent 3b9f8cbd7b
commit 093a51ddb3
1 changed files with 13 additions and 1 deletions

View File

@ -6,7 +6,19 @@ IF(COMMAND CMAKE_POLICY)
ENDIF(COMMAND CMAKE_POLICY)
SET(CMAKE_MODULE_PATH "${HURRICANE_SOURCE_DIR}/cmake_modules/")
SET(CMAKE_OSX_ARCHITECTURES "i386;ppc") # for QT4.5 32bits on snow leopard
IF(APPLE)
EXECUTE_PROCESS(
COMMAND sw_vers -productVersion
OUTPUT_VARIABLE OSX_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
MESSAGE(STATUS "OSX_VERSION='${OSX_VERSION}'")
IF(${OSX_VERSION} MATCHES "^10\\.[012345]*")
MESSAGE(STATUS "OSX < 10.6")
ELSE(${OSX_VERSION} MATCHES "^10\\.[012345]*")
SET(CMAKE_OSX_ARCHITECTURES "i386;ppc") # for QT4.5 32bits on snow leopard
ENDIF(${OSX_VERSION} MATCHES "^10\\.[012345]*")
ENDIF(APPLE)
OPTION(BUILD_STATIC "Build static version of libraries & binaries" OFF)
OPTION(BUILD_DOC "Build the documentation (doxygen)" OFF)