From e4810990f0e1e6eef11c9f16819607007bffb139 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 19 Dec 2013 15:10:28 +0000 Subject: [PATCH] =?UTF-8?q?From=20Sylvain=20Marie,=20When=20compiling=20OS?= =?UTF-8?q?G=20for=20the=20iOS=20simulator,=20providing=20both=20-miphoneo?= =?UTF-8?q?s-version-min=20and=20-mios-simulator-version-min=20doesn?= =?UTF-8?q?=E2=80=99t=20please=20clang=20(tested=20on=20OS=20X=2010.9.0=20?= =?UTF-8?q?with=20Xcode=205.0.1).=20Here=20is=20a=20small=20change=20(agai?= =?UTF-8?q?nst=20commit=20da597ab16945c572a2ad2f4f26fcef38ed21b074)=20in?= =?UTF-8?q?=20the=20CMakeLists.txt=20to=20avoid=20this=20situation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ccd7b156..129bbedc6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -906,16 +906,21 @@ IF(APPLE AND NOT ANDROID) IF(OSG_BUILD_PLATFORM_IPHONE) IF(${IPHONE_VERSION_MIN} LESS "7.0") SET(CMAKE_OSX_ARCHITECTURES "armv6;armv7" CACHE STRING "Build architectures for iOS" FORCE) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -miphoneos-version-min=${IPHONE_VERSION_MIN} -mno-thumb -pipe -no-cpp-precomp" CACHE STRING "Flags used by the compiler during all build types." FORCE) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-thumb -pipe -no-cpp-precomp" CACHE STRING "Flags used by the compiler during all build types." FORCE) ELSE() SET(CMAKE_OSX_ARCHITECTURES "armv7;armv7s;arm64" CACHE STRING "Build architectures for iOS" FORCE) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -miphoneos-version-min=${IPHONE_VERSION_MIN} -pipe -no-cpp-precomp" CACHE STRING "Flags used by the compiler during all build types." FORCE) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -no-cpp-precomp" CACHE STRING "Flags used by the compiler during all build types." FORCE) ENDIF() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -miphoneos-version-min=${IPHONE_VERSION_MIN}" FORCE) + ELSE() #simulator uses i386 architectures SET(CMAKE_OSX_ARCHITECTURES "i386" CACHE STRING "Build architectures for iOS Simulator" FORCE) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-thumb -arch i386 -pipe -no-cpp-precomp" CACHE STRING "Flags used by the compiler during all build types." FORCE) + + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mios-simulator-version-min=${IPHONE_VERSION_MIN}" FORCE) + ENDIF() #here we set the specific iphone sdk version. We can only set either device or simulator sdk. So if you want both you currently have to have two seperate projects