From 864e5cb6f03796d92c162837260ad40edc9c22e3 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 24 Jun 2013 09:59:22 +0000 Subject: [PATCH] From Frederic Morin, "Current behaviour uses SDKSettings.plist to determine osx version but this file is only available when XCode is installed. This version works also when Command Line Tools for XCode are installed (minimum build env for osx without XCode) See https://github.com/openscenegraph/osg/pull/8 for patch details Patch: https://github.com/openscenegraph/osg/pull/8/files" --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index daf1319f8..034db43af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,9 +231,11 @@ ENDIF(OSG_MAINTAINER) 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" + EXECUTE_PROCESS(COMMAND "/usr/bin/sw_vers" "-productVersion" OUTPUT_VARIABLE OSG_OSX_SDK_NAME OUTPUT_STRIP_TRAILING_WHITESPACE) + STRING(SUBSTRING "${OSG_OSX_SDK_NAME}" 0 4 OSG_OSX_SDK_NAME) + SET(OSG_OSX_SDK_NAME "macosx${OSG_OSX_SDK_NAME}") # Trying to get CMake to generate an XCode IPhone project, current efforts are to get iphoneos sdk 3.1 working # Added option which needs manually setting to select the IPhone SDK for building. We can only have one of the below