From bc4f6fc695c7c31ee73e9a89356719992a80f75e Mon Sep 17 00:00:00 2001 From: Tonya Souther Date: Sun, 31 Jul 2011 09:21:13 -0500 Subject: [PATCH] Allow building on OS X Lion. Requires the 10.6 (Snow Leopard) SDK. --- build_firestorm_macosx.sh | 20 ++++++++++++++++---- indra/cmake/Variables.cmake | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/build_firestorm_macosx.sh b/build_firestorm_macosx.sh index d7a417365c..d8f4873649 100755 --- a/build_firestorm_macosx.sh +++ b/build_firestorm_macosx.sh @@ -251,16 +251,28 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then fi ./develop.py -t $BTYPE configure $KDU -DPACKAGE:BOOL=ON -DLL_TESTS:BOOL=OFF -DVIEWER_CHANNEL:STRING=Firestorm-$CHANNEL -DVIEWER_LOGIN_CHANNEL:STRING=Firestorm-$CHANNEL 2>&1 | tee $LOG # LL build wants this directory to exist, but doesn't make it itself. - mkdir -p ./build-darwin-i386/newview/Release/Firestorm.app + if [ -f "./build-darwin-i386/SecondLife.xcodeproj" ]; then + mkdir -p ./build-darwin-i386/newview/Release/Firestorm.app + elif [ -f "./build-darwin-i686/SecondLife.xcodeproj" ]; then + mkdir -p ./build-darwin-i686/newview/Release/Firestorm.app + fi fi if [ $WANTS_BUILD -eq $TRUE ] ; then echo "Building in progress. Check $LOG for verbose status." # -sdk macosx10.6 - xcodebuild -project build-darwin-i386/SecondLife.xcodeproj \ - -alltargets -configuration $BTYPE GCC_VERSION=4.2 \ - -sdk macosx10.5 GCC_OPTIMIZATION_LEVEL=3 ARCHS=i386 \ + PROJDIR="build-darwin-i386/SecondLife.xcodeproj" + if [ ! -d $PROJDIR ]; then + PROJDIR="build-darwin-i686/SecondLife.xcodeproj" + if [ ! -d $PROJDIR ]; then + echo "Could not find Xcode project file." + exit 2 + fi + fi + xcodebuild -project $PROJDIR -alltargets -configuration $BTYPE \ + MACOSX_DEPLOYMENT_TARGET=10.4 GCC_VERSION=4.2 \ + -sdk macosx10.6 GCC_OPTIMIZATION_LEVEL=3 ARCHS=i386 \ GCC_ENABLE_SSE3_EXTENSIONS=YES 2>&1 | tee $LOG | \ grep -e "[(make.*Error)|(xcodebuild.*Error)] " trap - INT TERM EXIT diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index c683156ba0..028d830b4f 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -87,7 +87,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if (NOT CMAKE_OSX_DEPLOYMENT_TARGET) # NOTE: setting -isysroot is NOT adequate: http://lists.apple.com/archives/Xcode-users/2007/Oct/msg00696.html # see http://public.kitware.com/Bug/view.php?id=9959 + poppy - set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk) + set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk) set(CMAKE_OSX_DEPLOYMENT_TARGET 10.4) endif (NOT CMAKE_OSX_DEPLOYMENT_TARGET)