ios simulator build: set CMAKE_OSX_SYSROOT

When building for iphone simulator it is required to set the CMAKE_OSX_SYSROOT
to "iphonesimulator" otherwise command line builds (with cmake --build) will fail.
(cherry picked from commit 6d2142182d)
This commit is contained in:
Bernhard Miklautz 2013-10-05 21:47:03 +02:00 committed by Bernhard Miklautz
parent 88963aae5c
commit 413c4dea65

View File

@ -472,7 +472,11 @@ endif()
if (IOS)
set(CMAKE_OSX_DEPLOYMENT_TARGET "")
set(CMAKE_OSX_SYSROOT "iphoneos")
if (IOS_PLATFORM MATCHES "SIMULATOR")
set(CMAKE_OSX_SYSROOT "iphonesimulator")
else()
set(CMAKE_OSX_SYSROOT "iphoneos")
endif()
endif()
if(WITH_CLIENT)