From 093a51ddb37fa81dc12703c8dcc15a807cf0a84e Mon Sep 17 00:00:00 2001 From: Jean-Manuel Caba Date: Wed, 30 Sep 2009 21:49:33 +0000 Subject: [PATCH] Wrapping SET(CMAKE_OSX_ARCHITECTURES "i386;ppc") to compile on older version than Snow Leopard --- hurricane/CMakeLists.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hurricane/CMakeLists.txt b/hurricane/CMakeLists.txt index a03d9934..0c64f176 100644 --- a/hurricane/CMakeLists.txt +++ b/hurricane/CMakeLists.txt @@ -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)