diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b3f30efc..b436726f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -190,7 +190,7 @@ IF(NOT ANDROID) IF(APPLE) # Determine the canonical name of the selected Platform SDK EXECUTE_PROCESS(COMMAND "defaults" "read" "${CMAKE_OSX_SYSROOT}/SDKSettings.plist" "CanonicalName" - OUTPUT_VARIABLE APPLE_PLATFORM_SDK_CANONICAL_NAME + OUTPUT_VARIABLE OSG_OSX_SDK_NAME OUTPUT_STRIP_TRAILING_WHITESPACE) # Trying to get CMake to generate an XCode IPhone project, current efforts are to get iphoneos sdk 3.1 working @@ -824,18 +824,18 @@ IF(APPLE) # FORCE is used because the options are not reflected in the UI otherwise. # Seems like a good place to add version specific compiler flags too. IF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE) - IF(${APPLE_PLATFORM_SDK_CANONICAL_NAME} STREQUAL "macosx10.7") + IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.7") SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "imageio" CACHE STRING "Forced imageio default image plugin for OSX" FORCE) # 64 Bit Works, PPC is not supported any more 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.7 -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE) - ELSEIF(${APPLE_PLATFORM_SDK_CANONICAL_NAME} STREQUAL "macosx10.6" / - ${APPLE_PLATFORM_SDK_CANONICAL_NAME} STREQUAL "macosx10.5") + ELSEIF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.6" / + ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.5") SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "imageio" CACHE STRING "Forced imageio default image plugin for OSX" FORCE) # 64-bit compiles are not supported with Carbon. SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.5 -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE) - ELSEIF(${APPLE_PLATFORM_SDK_CANONICAL_NAME} STREQUAL "macosx10.4") + ELSEIF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.4") SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "quicktime" CACHE STRING "Forced imageio default image plugin for OSX" FORCE) SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.4 -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE) diff --git a/src/osgViewer/CMakeLists.txt b/src/osgViewer/CMakeLists.txt index f7092ec6e..c4e62b465 100644 --- a/src/osgViewer/CMakeLists.txt +++ b/src/osgViewer/CMakeLists.txt @@ -68,9 +68,9 @@ ELSE() IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR) SET(OSG_WINDOWING_SYSTEM "IOS" CACHE STRING "Windowing system type for graphics window creation, options only IOS.") ELSE() - IF(${APPLE_PLATFORM_SDK_CANONICAL_NAME} STREQUAL "macosx10.7" OR - ${APPLE_PLATFORM_SDK_CANONICAL_NAME} STREQUAL "macosx10.6" OR - ${APPLE_PLATFORM_SDK_CANONICAL_NAME} STREQUAL "macosx10.5") + IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.7" OR + ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.6" OR + ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.5") SET(OSG_WINDOWING_SYSTEM "Cocoa" CACHE STRING "Windowing system type for graphics window creation, options Carbon, Cocoa or X11.") ELSE() SET(OSG_WINDOWING_SYSTEM "Carbon" CACHE STRING "Windowing system type for graphics window creation, options Carbon, Cocoa or X11.")