As per Ulrich Hertlrein's suggestion, changed APPLE_PLATFORM_SDK_CANONICAL_NAME to OSG_OSX_SDK_NAME.

This commit is contained in:
Robert Osfield 2012-03-23 10:21:51 +00:00
parent c2ae14f94d
commit 5fc6f0a796
2 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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.")