iOS: Move device/simulator conditionals out of common mkspecs
Instead we deal with any differenced by setting variables in the top level makespecs, that are used by the common makespec configs. Change-Id: Iae1fb5fef8c95778511ed400008731989b446f3c Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
d898689300
commit
6e594a9451
@ -3,16 +3,6 @@
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
# Device?
|
||||
!*simulator*: \
|
||||
# Samsung S5PC100, Apple A4, A5, A5X
|
||||
QMAKE_IOS_TARGET_ARCH = armv7
|
||||
else: \
|
||||
# Simulator is i386 only
|
||||
QMAKE_IOS_TARGET_ARCH = i386
|
||||
|
||||
# FIXME: Add armv7s support when we need it
|
||||
|
||||
QMAKE_IOS_ARCH_FLAGS = -arch $$QMAKE_IOS_TARGET_ARCH
|
||||
|
||||
QMAKE_CFLAGS += $$QMAKE_IOS_ARCH_FLAGS
|
||||
@ -20,5 +10,4 @@ QMAKE_CXXFLAGS += $$QMAKE_IOS_ARCH_FLAGS
|
||||
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_ARCH_FLAGS
|
||||
QMAKE_LFLAGS += $$QMAKE_IOS_ARCH_FLAGS
|
||||
|
||||
unset(QMAKE_IOS_TARGET_ARCH)
|
||||
unset(QMAKE_IOS_ARCH_FLAGS)
|
||||
|
@ -7,16 +7,10 @@
|
||||
#
|
||||
|
||||
# iOS build flags
|
||||
QMAKE_IOS_CFLAGS = -fvisibility=hidden -fpascal-strings -fmessage-length=0
|
||||
QMAKE_IOS_CFLAGS += -fvisibility=hidden -fpascal-strings -fmessage-length=0
|
||||
QMAKE_IOS_CFLAGS += -Wno-trigraphs -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -Wno-sign-conversion
|
||||
QMAKE_IOS_CXXFLAGS = -fvisibility-inlines-hidden
|
||||
QMAKE_IOS_OBJ_CFLAGS = -Wno-arc-abi -Wc++0x-extensions
|
||||
|
||||
# Device or simulator specific flags
|
||||
*simulator* {
|
||||
QMAKE_IOS_CFLAGS += -fexceptions -fasm-blocks
|
||||
QMAKE_IOS_OBJ_CFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch
|
||||
}
|
||||
QMAKE_IOS_CXXFLAGS += -fvisibility-inlines-hidden
|
||||
QMAKE_IOS_OBJ_CFLAGS += -Wno-arc-abi -Wc++0x-extensions
|
||||
|
||||
# Clang 3.1 (and above) flags
|
||||
QMAKE_IOS_CFLAGS += -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wno-unused-function -Wno-unused-label -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion
|
||||
|
@ -9,6 +9,20 @@
|
||||
# QMAKE_IOSSIMULATOR_SDK_VERSION - set in mkspecs/common/ios/versions.conf
|
||||
#
|
||||
|
||||
QMAKE_XCODE_TOOLCHAIN_BIN_PATH = $$QMAKE_XCODE_DEVELOPER_PATH/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
||||
|
||||
# iOS build tools
|
||||
QMAKE_CC = $$QMAKE_XCODE_TOOLCHAIN_BIN_PATH/clang
|
||||
QMAKE_CXX = $$QMAKE_XCODE_TOOLCHAIN_BIN_PATH/clang++
|
||||
QMAKE_FIX_RPATH = $$QMAKE_XCODE_TOOLCHAIN_BIN_PATH/install_name_tool -id
|
||||
QMAKE_AR = $$QMAKE_XCODE_TOOLCHAIN_BIN_PATH/ar cq
|
||||
QMAKE_RANLIB = $$QMAKE_XCODE_TOOLCHAIN_BIN_PATH/ranlib -s
|
||||
QMAKE_LINK = $$QMAKE_CXX
|
||||
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
|
||||
|
@ -60,15 +60,14 @@ isEmpty(QMAKE_IOS_XCODE_VERSION) {
|
||||
QMAKE_IOS_XCODE_INFO =
|
||||
}
|
||||
|
||||
# Version check
|
||||
lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later")
|
||||
|
||||
QMAKE_XCODE_PLATFORM_PATH = $${QMAKE_XCODE_DEVELOPER_PATH}/Platforms
|
||||
|
||||
# iOS 4.3 is the preferred version as it is the earliest version that is armv7/gles2 only
|
||||
QMAKE_IPHONEOS_PREFERRED_TARGET = 4.3
|
||||
|
||||
# iOS SDK device type
|
||||
!*simulator*: QMAKE_IOS_DEVICE_TYPE = iPhoneOS
|
||||
else: QMAKE_IOS_DEVICE_TYPE = iPhoneSimulator
|
||||
|
||||
# iOS platform /Developer path
|
||||
QMAKE_IOS_DEV_PATH = $$QMAKE_XCODE_DEVELOPER_PATH/Platforms/$${QMAKE_IOS_DEVICE_TYPE}.platform/Developer
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
#
|
||||
# qmake configuration for ios-device-clang
|
||||
#
|
||||
# Depends on:
|
||||
#
|
||||
# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
|
||||
#
|
||||
|
||||
QMAKE_IOS_DEVICE_TYPE = iPhoneOS
|
||||
|
||||
# Samsung S5PC100, Apple A4, A5, A5X
|
||||
QMAKE_IOS_TARGET_ARCH = armv7
|
||||
|
||||
# FIXME: Add armv7s (A6) support when we need it
|
||||
|
||||
include(../../common/mac.conf)
|
||||
include(../../common/gcc-base-ios.conf)
|
||||
@ -15,19 +18,4 @@ include(../../common/ios/clang.conf)
|
||||
include(../../common/ios/qmake.conf)
|
||||
include(../../common/ios/arch.conf)
|
||||
|
||||
# Version check
|
||||
lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later")
|
||||
|
||||
# iOS build tools
|
||||
QMAKE_CC = $$QMAKE_XCODE_DEVELOPER_PATH/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
QMAKE_CXX = $$QMAKE_XCODE_DEVELOPER_PATH/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
|
||||
QMAKE_FIX_RPATH = $$QMAKE_XCODE_DEVELOPER_PATH/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool -id
|
||||
QMAKE_AR = $$QMAKE_XCODE_DEVELOPER_PATH/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar cq
|
||||
QMAKE_RANLIB = $$QMAKE_XCODE_DEVELOPER_PATH/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib -s
|
||||
QMAKE_LINK = $$QMAKE_CXX
|
||||
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")
|
||||
|
||||
load(qt_config)
|
||||
load(qt_config)
|
||||
|
@ -2,5 +2,21 @@
|
||||
# qmake configuration for ios-simulator-clang
|
||||
#
|
||||
|
||||
# All differences between device and simulator are handled in iOS include files
|
||||
include(../macx-iosdevice-clang/qmake.conf)
|
||||
QMAKE_IOS_DEVICE_TYPE = iPhoneSimulator
|
||||
|
||||
# Simulator is i386 only
|
||||
QMAKE_IOS_TARGET_ARCH = i386
|
||||
|
||||
QMAKE_IOS_CFLAGS += -fexceptions -fasm-blocks
|
||||
QMAKE_IOS_OBJ_CFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch
|
||||
|
||||
include(../../common/mac.conf)
|
||||
include(../../common/gcc-base-ios.conf)
|
||||
include(../../common/clang.conf)
|
||||
include(../../common/ios.conf)
|
||||
include(../../common/ios/versions.conf)
|
||||
include(../../common/ios/clang.conf)
|
||||
include(../../common/ios/qmake.conf)
|
||||
include(../../common/ios/arch.conf)
|
||||
|
||||
load(qt_config)
|
||||
|
Loading…
Reference in New Issue
Block a user