diff options
author | Aura Linden <aura@lindenlab.com> | 2012-07-23 12:34:02 -0700 |
---|---|---|
committer | Aura Linden <aura@lindenlab.com> | 2012-07-23 12:34:02 -0700 |
commit | 5624f03b9c49624ab6360f735e7fca90c365d8c1 (patch) | |
tree | 0f17c3da571ab90804ccd4d60f2d1b0bd66a75f9 | |
parent | d2e67d0c0bc6e379a4241abf814f9e13a830ad31 (diff) |
Changed CMake to work for older and newer versions of OSX
-rw-r--r-- | indra/cmake/Variables.cmake | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index dd177ef222..4bd980f9db 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -99,10 +99,21 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(DARWIN 1) + execute_process( + COMMAND sh -c "sw_vers -productVersion | cut -d'.' -f1-2" + OUTPUT_VARIABLE DARWIN_VERSION ) + # To support a different SDK update these Xcode settings: - set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6) - set(CMAKE_OSX_SYSROOT macosx10.6) - set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42") + if (DARWIN_VERSION GREATER 10.6) + set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6) + set(CMAKE_OSX_SYSROOT macosx10.6) + set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42") + else (DARWIN_VERSION GREATER 10.6) + set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5) + set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk) + set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.0") + endif (DARWIN_VERSION GREATER 10.6) + set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym) # NOTE: To attempt an i386/PPC Universal build, add this on the configure line: |