From ea5af1d010e89e03c4f12bf5d008454818eec2ef Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 10 Mar 2010 11:09:55 +0000 Subject: [PATCH] From Nico Krulthof and Jori Torres, additions for detecting OSX 10.6 SDK and setting variable defaults accordingly. --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df1f4b1ac..d3c6c9408 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -694,7 +694,12 @@ IF(APPLE) # version information we need. (Darwin versions can be changed # independently of OS X versions.) # It does look like CMake handles the CMAKE_OSX_SYSROOT automatically. - IF(EXISTS /Developer/SDKs/MacOSX10.5.sdk) + IF(EXISTS /Developer/SDKs/MacOSX10.6.sdk) + SET(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "Build architectures for OSX" FORCE) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.6 -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE) + SET(OSG_WINDOWING_SYSTEM "Cocoa" CACHE STRING "Forced Cocoa windowing system in 64 bits snow leopard" FORCE) + SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "imageio " CACHE STRING "Forced imageio default image plugin for OSX in 64 bits snow leopard" FORCE) + ELSEIF(EXISTS /Developer/SDKs/MacOSX10.5.sdk) # 64-bit compiles are not supported with Carbon. We should enable # 64-bit compilation by default once osgviewer has been # rewritten with Cocoa.