summaryrefslogtreecommitdiff
path: root/indra/cmake/Variables.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/Variables.cmake')
-rw-r--r--indra/cmake/Variables.cmake17
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: