iOS: Use sdk.prf to set -isysroot based on the chosen SDK
Change-Id: I4683ab422ad886b86604fbd68f8dfb4cf6bfc06e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>bb10
parent
6e594a9451
commit
2aeb742a58
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
CONFIG += ios reduce_exports incremental global_init_link_order lib_version_first plugin_no_soname
|
||||
CONFIG += ios reduce_exports incremental global_init_link_order lib_version_first plugin_no_soname sdk
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
# Qt can't build iOS app bundle :(
|
||||
|
|
|
|||
|
|
@ -23,11 +23,6 @@ QMAKE_LINK_SHLIB = $$QMAKE_CXX
|
|||
# Check that compiler is valid
|
||||
!exists($$QMAKE_CXX): error("The version of Xcode installed on this system does not include the clang compiler")
|
||||
|
||||
QMAKE_CFLAGS += -isysroot $$QMAKE_IOS_SDK_PATH
|
||||
QMAKE_CXXFLAGS += -isysroot $$QMAKE_IOS_SDK_PATH
|
||||
QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_IOS_SDK_PATH
|
||||
QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_IOS_SDK_PATH
|
||||
|
||||
# Basic iOS frameworks needed for any GUI app
|
||||
QMAKE_LFLAGS += -framework Foundation -framework UIKit -framework QuartzCore -lz
|
||||
|
||||
|
|
@ -37,7 +32,7 @@ QMAKE_LIBDIR_OPENGL_ES1 =
|
|||
QMAKE_LIBS_OPENGL_ES1 =
|
||||
|
||||
# OpenGL ES2
|
||||
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_IOS_SDK/System/Library/Frameworks/OpenGLES.framework/Headers
|
||||
QMAKE_INCDIR_OPENGL_ES2 =
|
||||
QMAKE_LIBDIR_OPENGL_ES2 =
|
||||
QMAKE_LIBS_OPENGL_ES2 = -framework OpenGLES
|
||||
|
||||
|
|
|
|||
|
|
@ -87,15 +87,11 @@ isEmpty(QMAKE_IOS_SDK_VERSION) {
|
|||
greaterThan(v, $$QMAKE_IOS_SDK_VERSION): QMAKE_IOS_SDK_VERSION = $$v
|
||||
}
|
||||
|
||||
isEmpty(QMAKE_IOS_SDK_VERSION): error("Could not find a usable SDK, please install using Xcode")
|
||||
# We have at least one version of this SDK, so we choose the latest one by
|
||||
# passing the SDK identifier as QMAKE_MAC_SDK, as reccomended by Apple.
|
||||
QMAKE_MAC_SDK = $$sdk_identifier
|
||||
}
|
||||
|
||||
# iOS platform SDK path
|
||||
QMAKE_IOS_SDK_PATH = $$QMAKE_IOS_DEV_PATH/SDKs/$${QMAKE_IOS_DEVICE_TYPE}$${QMAKE_IOS_SDK_VERSION}.sdk
|
||||
|
||||
# Make sure iOS SDK version is valid
|
||||
!exists($$QMAKE_IOS_SDK_PATH): error("iOS $$QMAKE_IOS_SDK_VERSION SDK not found at $$QMAKE_IOS_SDK_PATH")
|
||||
|
||||
# No deployment target specified?
|
||||
isEmpty(QMAKE_IPHONEOS_DEPLOYMENT_TARGET) {
|
||||
# Use SDK version for iOS versions < preferred
|
||||
|
|
|
|||
Loading…
Reference in New Issue