diff options
Diffstat (limited to 'mkspecs/features/uikit')
-rw-r--r-- | mkspecs/features/uikit/default_post.prf | 19 | ||||
-rw-r--r-- | mkspecs/features/uikit/default_pre.prf | 39 | ||||
-rw-r--r-- | mkspecs/features/uikit/resolve_config.prf | 27 |
3 files changed, 27 insertions, 58 deletions
diff --git a/mkspecs/features/uikit/default_post.prf b/mkspecs/features/uikit/default_post.prf index 199074eefe..b4de83d6b5 100644 --- a/mkspecs/features/uikit/default_post.prf +++ b/mkspecs/features/uikit/default_post.prf @@ -91,15 +91,16 @@ macx-xcode { only_active_arch.build = debug QMAKE_MAC_XCODE_SETTINGS += only_active_arch } else { - # Be more specific about which architecture we're targeting - contains(QT_ARCH, arm.*) { - ios: VALID_ARCHS = $$QMAKE_IOS_DEVICE_ARCHS - tvos: VALID_ARCHS = $$QMAKE_TVOS_DEVICE_ARCHS - watchos: VALID_ARCHS = $$QMAKE_WATCHOS_DEVICE_ARCHS - } else { - ios: VALID_ARCHS = $$QMAKE_IOS_SIMULATOR_ARCHS - tvos: VALID_ARCHS = $$QMAKE_TVOS_SIMULATOR_ARCHS - watchos: VALID_ARCHS = $$QMAKE_WATCHOS_SIMULATOR_ARCHS + VALID_ARCHS = + !simulator|simulator_and_device { + ios: VALID_ARCHS += $$QMAKE_IOS_DEVICE_ARCHS + tvos: VALID_ARCHS += $$QMAKE_TVOS_DEVICE_ARCHS + watchos: VALID_ARCHS += $$QMAKE_WATCHOS_DEVICE_ARCHS + } + simulator { + ios: VALID_ARCHS += $$QMAKE_IOS_SIMULATOR_ARCHS + tvos: VALID_ARCHS += $$QMAKE_TVOS_SIMULATOR_ARCHS + watchos: VALID_ARCHS += $$QMAKE_WATCHOS_SIMULATOR_ARCHS } single_arch: VALID_ARCHS = $$first(VALID_ARCHS) diff --git a/mkspecs/features/uikit/default_pre.prf b/mkspecs/features/uikit/default_pre.prf index e719ab0848..8b5b3ccfe9 100644 --- a/mkspecs/features/uikit/default_pre.prf +++ b/mkspecs/features/uikit/default_pre.prf @@ -1,31 +1,22 @@ load(default_pre) -# In case Qt was built for a specific SDK -!isEmpty(QT_VERSION):!qtConfig(simulator_and_device):contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \ - CONFIG += simulator $${simulator.sdk} +!isEmpty(QT_VERSION) { + qtConfig(simulator_and_device)|contains(QMAKE_MAC_SDK, ^$${device.sdk}.*): \ + CONFIG += device $${device.sdk} + qtConfig(simulator_and_device)|contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \ + CONFIG += simulator $${simulator.sdk} + + qtConfig(simulator_and_device) { + # For a simulator_and_device build all the config tests + # are based on the device's ARM SDK, but we know that the simulator + # is Intel and that we support SSE/SSE2. + QT_CPU_FEATURES.$$QT_ARCH += sse sse2 + CONFIG += sse sse2 + DEFINES += QT_COMPILER_SUPPORTS_SSE2 + } +} # Check for supported Xcode versions lessThan(QMAKE_XCODE_VERSION, "4.3"): \ error("This mkspec requires Xcode 4.3 or later") - -build_pass:simulator { - # For a simulator_and_device build all the config tests - # are based on the iPhoneOS/WatchOS ARM SDK, but we know that the simulator - # is i386 and that we support SSE/SSE2. - QT_ARCH = i386 - QT_CPU_FEATURES.i386 = sse sse2 - DEFINES += QT_COMPILER_SUPPORTS_SSE2 - CONFIG -= neon - CONFIG += sse sse2 -} -build_pass:appletvsimulator { - # For a simulator_and_device build all the config tests - # are based on the AppleTVOS ARM SDK, but we know that the simulator - # is x64 and that we support SSE/SSE2. - QT_ARCH = x64 - QT_CPU_FEATURES.x64 = sse sse2 - DEFINES += QT_COMPILER_SUPPORTS_SSE2 - CONFIG -= neon - CONFIG += sse sse2 -} diff --git a/mkspecs/features/uikit/resolve_config.prf b/mkspecs/features/uikit/resolve_config.prf index 983dca82f4..70ddd8be52 100644 --- a/mkspecs/features/uikit/resolve_config.prf +++ b/mkspecs/features/uikit/resolve_config.prf @@ -1,34 +1,11 @@ xcodebuild { # Xcode project files always support both Debug and Release configurations - # and iOS device and simulator targets, so we make sure the wrapper-makefile + # and device and simulator targets, so we make sure the wrapper-makefile # also does. CONFIG += debug_and_release simulator_and_device } load(resolve_config) -# Legacy exclusive build configurations for backwards compatibility -CONFIG($${device.CONFIG}, $${device.CONFIG}|$${simulator.CONFIG}): \ - CONFIG += device -else: CONFIG($${simulator.CONFIG}, $${device.CONFIG}|$${simulator.CONFIG}): \ - CONFIG += simulator - -CONFIG(simulator, simulator|device): \ - CONFIG -= device $${device.CONFIG} -else: \ - CONFIG -= simulator $${simulator.CONFIG} - -macx-xcode { - # There is no way to genereate Xcode projects that are limited to either - # simulator or device builds, so simulator_and_device is always - # effectivly active, even if the user disabled it explicitly. - # The Xcode generator doesn't support multiple BUILDS though (exclusive - # builds), so we have to manually set up the simulator suffix. - library_suffix_simulator.name = "$${QMAKE_XCODE_LIBRARY_SUFFIX_SETTING}[sdk=$${simulator.sdk}*]" - library_suffix_simulator.value = "_$${simulator.sdk}$($${QMAKE_XCODE_LIBRARY_SUFFIX_SETTING})" - QMAKE_MAC_XCODE_SETTINGS += library_suffix_simulator - CONFIG *= xcode_dynamic_library_suffix -} else { - addExclusiveBuilds(simulator, device) -} +!macx-xcode:xcodebuild: addExclusiveBuilds(simulator, device) |