summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-01-24 10:33:37 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-01-25 20:06:06 +0100
commit318b58562ae89453fb98e8145cd0440e14ba60b0 (patch)
tree622bc032cf076b4569621032f3a3315d95c3ae88 /mkspecs
parentc28fde3fdac19fd5a5f614bb7983080031c924b3 (diff)
parent79352528a1726b4551ea4d9285dd2394dd0d43da (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/common/msvc-version.conf mkspecs/common/winrt_winphone/qmake.conf mkspecs/features/mac/default_post.prf mkspecs/features/mac/sdk.prf mkspecs/features/qt.prf mkspecs/features/uikit/default_post.prf mkspecs/features/winrt/default_pre.prf mkspecs/winphone-arm-msvc2013/qmake.conf mkspecs/winphone-x86-msvc2013/qmake.conf mkspecs/winrt-arm-msvc2013/qmake.conf mkspecs/winrt-x64-msvc2013/qmake.conf mkspecs/winrt-x86-msvc2013/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/gui/kernel/qwindowsysteminterface.cpp src/network/kernel/qhostaddress.cpp src/plugins/platforms/mirclient/qmirclientplugin.cpp src/plugins/platforms/mirclient/qmirclientplugin.h src/widgets/util/qsystemtrayicon.cpp tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp tools/configure/Makefile.mingw tools/configure/Makefile.win32 Done-with: Jake Petroules <jake.petroules@qt.io> Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/msvc-desktop.conf10
-rw-r--r--mkspecs/common/msvc-version.conf (renamed from mkspecs/common/msvc-base.conf)42
-rw-r--r--mkspecs/common/winrt_winphone/qmake.conf4
-rw-r--r--mkspecs/devices/linux-drive-cx-g++/qmake.conf10
-rw-r--r--mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf10
-rw-r--r--mkspecs/features/configure_base.prf1
-rw-r--r--mkspecs/features/data/configure.json7
-rw-r--r--mkspecs/features/data/macros.cpp28
-rw-r--r--mkspecs/features/default_post.prf2
-rw-r--r--mkspecs/features/mac/default_post.prf82
-rw-r--r--mkspecs/features/mac/sdk.prf86
-rw-r--r--mkspecs/features/qt.prf257
-rw-r--r--mkspecs/features/qt_common.prf5
-rw-r--r--mkspecs/features/qt_configure.prf141
-rw-r--r--mkspecs/features/qt_module.prf7
-rw-r--r--mkspecs/features/qt_plugin.prf4
-rw-r--r--mkspecs/features/qt_targets.prf6
-rw-r--r--mkspecs/features/resolve_target.prf1
-rw-r--r--mkspecs/features/resources.prf2
-rw-r--r--mkspecs/features/toolchain.prf108
-rw-r--r--mkspecs/features/win32/default_pre.prf1
-rw-r--r--mkspecs/features/winrt/package_manifest.prf6
-rw-r--r--mkspecs/win32-clang-msvc/qmake.conf (renamed from mkspecs/win32-clang-msvc2015/qmake.conf)8
-rw-r--r--mkspecs/win32-clang-msvc/qplatformdefs.h (renamed from mkspecs/win32-msvc2012/qplatformdefs.h)2
-rw-r--r--mkspecs/win32-clang-msvc2015/qplatformdefs.h34
-rw-r--r--mkspecs/win32-icc/qplatformdefs.h2
-rw-r--r--mkspecs/win32-msvc/qmake.conf8
-rw-r--r--mkspecs/win32-msvc/qplatformdefs.h (renamed from mkspecs/win32-msvc2005/qplatformdefs.h)0
-rw-r--r--mkspecs/win32-msvc2005/qmake.conf10
-rw-r--r--mkspecs/win32-msvc2008/qmake.conf10
-rw-r--r--mkspecs/win32-msvc2008/qplatformdefs.h40
-rw-r--r--mkspecs/win32-msvc2010/qmake.conf10
-rw-r--r--mkspecs/win32-msvc2012/qmake.conf10
-rw-r--r--mkspecs/win32-msvc2013/qmake.conf10
-rw-r--r--mkspecs/win32-msvc2015/qmake.conf10
-rw-r--r--mkspecs/win32-msvc2015/qplatformdefs.h40
-rw-r--r--mkspecs/win32-msvc2017/qmake.conf10
-rw-r--r--mkspecs/win32-msvc2017/qplatformdefs.h34
-rw-r--r--mkspecs/winrt-arm-msvc2015/qmake.conf3
-rw-r--r--mkspecs/winrt-x64-msvc2015/qmake.conf3
-rw-r--r--mkspecs/winrt-x64-msvc2017/qmake.conf20
-rw-r--r--mkspecs/winrt-x64-msvc2017/qplatformdefs.h (renamed from mkspecs/win32-msvc2010/qplatformdefs.h)2
-rw-r--r--mkspecs/winrt-x86-msvc2015/qmake.conf3
-rw-r--r--mkspecs/winrt-x86-msvc2017/qmake.conf19
-rw-r--r--mkspecs/winrt-x86-msvc2017/qplatformdefs.h (renamed from mkspecs/win32-msvc2013/qplatformdefs.h)2
45 files changed, 532 insertions, 578 deletions
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf
index b72cdff252..02b8441547 100644
--- a/mkspecs/common/msvc-desktop.conf
+++ b/mkspecs/common/msvc-desktop.conf
@@ -1,12 +1,11 @@
#
# qmake configuration for Microsoft Visual Studio C/C++ Compiler
-# This mkspec is used for all win32-msvcXXXX specs
+# This mkspec is used by the win32-msvc and win32-clang-msvc specs
#
-isEmpty(MSC_VER)|isEmpty(MSVC_VER): error("Source mkspec must set both MSC_VER and MSVC_VER.")
-
#
# Baseline: Visual Studio 2005 (8.0), VC++ 14.0
+# Version-specific settings go in msvc-version.conf (loaded by default_pre)
#
MAKEFILE_GENERATOR = MSVC.NET
@@ -14,7 +13,7 @@ QMAKE_PLATFORM = win32
QMAKE_COMPILER = msvc
CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe
DEFINES += UNICODE WIN32
-QMAKE_COMPILER_DEFINES += _MSC_VER=$$MSC_VER _WIN32
+QMAKE_COMPILER_DEFINES += _WIN32
contains(QMAKE_TARGET.arch, x86_64) {
DEFINES += WIN64
QMAKE_COMPILER_DEFINES += _WIN64
@@ -104,7 +103,4 @@ VCPROJ_EXTENSION = .vcproj
VCSOLUTION_EXTENSION = .sln
VCPROJ_KEYWORD = Qt4VSv1.0
-include(msvc-base.conf)
include(windows-gles.conf)
-
-unset(MSC_VER)
diff --git a/mkspecs/common/msvc-base.conf b/mkspecs/common/msvc-version.conf
index d37f10f88e..664e48b042 100644
--- a/mkspecs/common/msvc-base.conf
+++ b/mkspecs/common/msvc-version.conf
@@ -1,6 +1,6 @@
#
# qmake configuration for Microsoft Visual Studio C/C++ Compiler
-# This mkspec is used for all win32-msvcXXXX and
+# This file is used by win32-msvc, win32-clang-msvc, and all
# winrt-XXX-msvcXXX specs
#
@@ -8,14 +8,23 @@
# Version-specific changes
#
-greaterThan(MSC_VER, 1499) {
+isEmpty(QMAKE_MSC_VER): error("msvc-version.conf loaded but QMAKE_MSC_VER isn't set")
+
+MSVC_VER = 8.0
+COMPAT_MKSPEC = win32-msvc2005
+
+greaterThan(QMAKE_MSC_VER, 1499) {
# Visual Studio 2008 (9.0) / Visual C++ 15.0 and up
+ MSVC_VER = 9.0
+ COMPAT_MKSPEC = win32-msvc2008
QMAKE_CFLAGS_MP = -MP
QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
}
-greaterThan(MSC_VER, 1599) {
+greaterThan(QMAKE_MSC_VER, 1599) {
# Visual Studio 2010 (10.0) / Visual C++ 16.0 and up
+ MSVC_VER = 10.0
+ COMPAT_MKSPEC = win32-msvc2010
MAKEFILE_GENERATOR = MSBUILD
QMAKE_CFLAGS_AVX = -arch:AVX
@@ -24,19 +33,23 @@ greaterThan(MSC_VER, 1599) {
VCPROJ_EXTENSION = .vcxproj
}
-greaterThan(MSC_VER, 1699) {
+greaterThan(QMAKE_MSC_VER, 1699) {
# Visual Studio 2012 (11.0) / Visual C++ 17.0 and up
+ MSVC_VER = 11.0
+ COMPAT_MKSPEC = win32-msvc2012
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -D_HAS_EXCEPTIONS=0
QT_CONFIG += c++11
CONFIG += c++11
}
-greaterThan(MSC_VER, 1799) {
+greaterThan(QMAKE_MSC_VER, 1799) {
# Visual Studio 2013 (12.0) / Visual C++ 18.0 and up
+ MSVC_VER = 12.0
+ COMPAT_MKSPEC = win32-msvc2013
QMAKE_CFLAGS += -FS
QMAKE_CXXFLAGS += -FS
- equals(MSC_VER, 1800) {
+ equals(QMAKE_MSC_VER, 1800) {
QMAKE_CFLAGS_RELEASE += -Zc:strictStrings
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings
QMAKE_CXXFLAGS_RELEASE += -Zc:strictStrings
@@ -44,11 +57,26 @@ greaterThan(MSC_VER, 1799) {
}
}
-greaterThan(MSC_VER, 1899) {
+greaterThan(QMAKE_MSC_VER, 1899) {
# Visual Studio 2015 (14.0) / Visual C++ 19.0 and up
+ MSVC_VER = 14.0
+ COMPAT_MKSPEC = win32-msvc2015
QMAKE_CFLAGS += -Zc:strictStrings
QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458
QMAKE_CFLAGS_AVX2 = -arch:AVX2
QMAKE_CXXFLAGS += -Zc:strictStrings -Zc:throwingNew
QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458 -wd4577 -wd4467
}
+
+greaterThan(QMAKE_MSC_VER, 1909) {
+ # Visual Studio 2017 (15.0) / Visual C++ 19.10 and up
+ MSVC_VER = 15.0
+ COMPAT_MKSPEC = win32-msvc2017
+}
+
+greaterThan(QMAKE_MSC_VER, 1910) {
+ # No compat spec past MSVC 2017
+ COMPAT_MKSPEC =
+}
+
+!isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC
diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf
index 0c3af4a7a8..818264c46b 100644
--- a/mkspecs/common/winrt_winphone/qmake.conf
+++ b/mkspecs/common/winrt_winphone/qmake.conf
@@ -9,6 +9,7 @@ QMAKE_COMPILER = msvc
QMAKE_PLATFORM = winrt win32
CONFIG = package_manifest $$CONFIG incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target rtti
DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT Q_BYTE_ORDER=Q_LITTLE_ENDIAN
+QMAKE_COMPILER_DEFINES += _WIN32
DEPLOYMENT_PLUGIN += qwinrt
@@ -93,9 +94,6 @@ WINRT_ASSETS_PATH = $$PWD/assets
WINRT_MANIFEST.capabilities = defaults
WINRT_MANIFEST.capabilities_device = defaults
-include(../msvc-base.conf)
include(../windows-gles.conf)
-unset(MSC_VER)
-
load(qt_config)
diff --git a/mkspecs/devices/linux-drive-cx-g++/qmake.conf b/mkspecs/devices/linux-drive-cx-g++/qmake.conf
index 985f8626ad..a658f29deb 100644
--- a/mkspecs/devices/linux-drive-cx-g++/qmake.conf
+++ b/mkspecs/devices/linux-drive-cx-g++/qmake.conf
@@ -16,8 +16,6 @@
include(../common/linux_device_pre.conf)
-isEmpty(VIBRANTE_SDK_TOPDIR):error("You must pass -device-option VIBRANTE_SDK_TOPDIR=/path/to/sdk")
-
QMAKE_INCDIR += \
$${VIBRANTE_SDK_TOPDIR}/include \
$$[QT_SYSROOT]/usr/include
@@ -43,4 +41,12 @@ COMPILER_FLAGS += -mtune=cortex-a57.cortex-a53 -march=armv8-a
EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice
include(../common/linux_arm_device_post.conf)
+
+# override the default from linux_arm_device_post.conf
+defineTest(qtConfSanitizeMkspec) {
+ isEmpty(VIBRANTE_SDK_TOPDIR): \
+ error("You must pass -device-option VIBRANTE_SDK_TOPDIR=/path/to/sdk")
+ deviceSanityCheckCompiler()
+}
+
load(qt_config)
diff --git a/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf b/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf
index 31aacad99f..1f44c47151 100644
--- a/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf
+++ b/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf
@@ -14,8 +14,6 @@
include(../common/linux_device_pre.conf)
-isEmpty(VIBRANTE_SDK_TOPDIR):error("You must pass -device-option VIBRANTE_SDK_TOPDIR=/path/to/sdk")
-
QMAKE_INCDIR += \
$${VIBRANTE_SDK_TOPDIR}/include \
$$[QT_SYSROOT]/usr/include
@@ -38,4 +36,12 @@ COMPILER_FLAGS += -mtune=cortex-a15 -march=armv7-a -mfpu=neon-vfpv
EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice
include(../common/linux_arm_device_post.conf)
+
+# override the default from linux_arm_device_post.conf
+defineTest(qtConfSanitizeMkspec) {
+ isEmpty(VIBRANTE_SDK_TOPDIR): \
+ error("You must pass -device-option VIBRANTE_SDK_TOPDIR=/path/to/sdk")
+ deviceSanityCheckCompiler()
+}
+
load(qt_config)
diff --git a/mkspecs/features/configure_base.prf b/mkspecs/features/configure_base.prf
index 41f429e204..a4464528b4 100644
--- a/mkspecs/features/configure_base.prf
+++ b/mkspecs/features/configure_base.prf
@@ -19,6 +19,7 @@ QMAKE_MAKE = $$(MAKE)
} else {
error("Configure tests are not supported with the $$MAKEFILE_GENERATOR Makefile generator.")
}
+QMAKE_MAKE_NAME = $$basename(QMAKE_MAKE)
# Make sure we don't inherit MAKEFLAGS - -i in particular is fatal.
QMAKE_MAKE = "$${SETENV_PFX}MAKEFLAGS=$$SETENV_SFX $$QMAKE_MAKE"
diff --git a/mkspecs/features/data/configure.json b/mkspecs/features/data/configure.json
index 8e5ff5f0a4..98ccde1ee3 100644
--- a/mkspecs/features/data/configure.json
+++ b/mkspecs/features/data/configure.json
@@ -14,12 +14,5 @@
"redo": { "type": "redo" }
}
-
- },
-
- "features": {
- "builtins": {
- "output": [ "builtins" ]
- }
}
}
diff --git a/mkspecs/features/data/macros.cpp b/mkspecs/features/data/macros.cpp
new file mode 100644
index 0000000000..88473fb980
--- /dev/null
+++ b/mkspecs/features/data/macros.cpp
@@ -0,0 +1,28 @@
+// Keep this file small. The pre-processed contents are eval'd by qmake.
+#ifdef _MSC_VER
+QMAKE_MSC_VER = _MSC_VER
+QMAKE_MSC_FULL_VER = _MSC_FULL_VER
+#endif
+#ifdef __INTEL_COMPILER
+QMAKE_ICC_VER = __INTEL_COMPILER
+QMAKE_ICC_UPDATE_VER = __INTEL_COMPILER_UPDATE
+#endif
+#ifdef __APPLE_CC__
+QMAKE_APPLE_CC = __APPLE_CC__
+#endif
+#ifdef __clang__
+#ifdef __APPLE_CC__
+QT_APPLE_CLANG_MAJOR_VERSION = __clang_major__
+QT_APPLE_CLANG_MINOR_VERSION = __clang_minor__
+QT_APPLE_CLANG_PATCH_VERSION = __clang_patchlevel__
+#else
+QT_CLANG_MAJOR_VERSION = __clang_major__
+QT_CLANG_MINOR_VERSION = __clang_minor__
+QT_CLANG_PATCH_VERSION = __clang_patchlevel__
+#endif
+#endif
+#ifdef __GNUC__
+QT_GCC_MAJOR_VERSION = __GNUC__
+QT_GCC_MINOR_VERSION = __GNUC_MINOR__
+QT_GCC_PATCH_VERSION = __GNUC_PATCHLEVEL__
+#endif
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index e7e9a5bd87..7f5ab3a10c 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -60,7 +60,7 @@ debug {
}
# disable special linker flags for host builds (no proper test for host support yet)
-!host_build {
+!host_build|!cross_compile {
use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
enable_new_dtags: QMAKE_LFLAGS += $$QMAKE_LFLAGS_NEW_DTAGS
}
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index 1b2e5d5db4..623a348684 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -1,9 +1,5 @@
load(default_post)
-# Ensure that we process sdk.prf first, as it will update QMAKE_CXX
-# and friends that other features/extra compilers may depend on.
-sdk: load(sdk)
-
!no_objective_c:CONFIG += objective_c
qt {
@@ -65,9 +61,9 @@ macx-xcode {
only_active_arch.build = debug
QMAKE_MAC_XCODE_SETTINGS += only_active_arch
} else {
- VALID_ARCHS =
- device|!simulator: VALID_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS
- simulator: VALID_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS
+ device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS
+ simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS
+ VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS
isEmpty(VALID_ARCHS): \
error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture")
@@ -86,6 +82,78 @@ macx-xcode {
QMAKE_LFLAGS += $$arch_flags
QMAKE_PCH_ARCHS = $$VALID_ARCHS
+
+ macos: deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET
+ ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET
+ tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET
+ watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET
+
+ # If we're doing a simulator_and_device build, device and simulator
+ # architectures use different paths and flags for the sysroot and
+ # deployment target switch, so we must multiplex them across multiple
+ # architectures using -Xarch. Otherwise we fall back to the simple path.
+ # This is not strictly necessary, but results in cleaner command lines
+ # and makes it easier for people to override EXPORT_VALID_ARCHS to limit
+ # individual rules to a different set of architecture(s) from the overall
+ # build (such as machtest in QtCore).
+ simulator_and_device {
+ QMAKE_XARCH_CFLAGS =
+ QMAKE_XARCH_LFLAGS =
+ QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS
+
+ for (arch, VALID_ARCHS) {
+ contains(VALID_SIMULATOR_ARCHS, $$arch) {
+ sdk = $$simulator.sdk
+ version_identifier = $$simulator.deployment_identifier
+ } else {
+ sdk = $$device.sdk
+ version_identifier = $$device.deployment_identifier
+ }
+
+ version_min_flags = \
+ -Xarch_$${arch} \
+ -m$${version_identifier}-version-min=$$deployment_target
+ QMAKE_XARCH_CFLAGS_$${arch} = $$version_min_flags \
+ -Xarch_$${arch} \
+ -isysroot$$xcodeSDKInfo(Path, $$sdk)
+ QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \
+ -Xarch_$${arch} \
+ -Wl,-syslibroot,$$xcodeSDKInfo(Path, $$sdk)
+
+ QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch})
+ QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch})
+
+ QMAKE_EXTRA_VARIABLES += \
+ QMAKE_XARCH_CFLAGS_$${arch} \
+ QMAKE_XARCH_LFLAGS_$${arch}
+ }
+
+ QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
+ QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
+ QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS)
+ } else {
+ simulator: \
+ version_identifier = $$simulator.deployment_identifier
+ else: \
+ version_identifier = $$device.deployment_identifier
+ version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
+ QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag
+ QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag
+ QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH $$version_min_flag
+ }
+
+ # Enable precompiled headers for multiple architectures
+ QMAKE_CFLAGS_USE_PRECOMPILE =
+ for (arch, VALID_ARCHS) {
+ QMAKE_CFLAGS_USE_PRECOMPILE += \
+ -Xarch_$${arch} \
+ -include${QMAKE_PCH_OUTPUT_$${arch}}
+ }
+ QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+ QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+ QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+
+ QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT}
}
cache(QMAKE_XCODE_DEVELOPER_PATH, stash)
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
index be885e52ee..68ab7e4053 100644
--- a/mkspecs/features/mac/sdk.prf
+++ b/mkspecs/features/mac/sdk.prf
@@ -47,89 +47,3 @@ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_
$$tool = $$sysrooted $$member(value, 1, -1)
cache($$tool_variable, set stash, $$tool)
}
-
-!equals(MAKEFILE_GENERATOR, XCODE) {
- macos: deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET
- ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET
- tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET
- watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET
-
- device|!simulator: device_archs = $$QMAKE_APPLE_DEVICE_ARCHS
- simulator: simulator_archs = $$QMAKE_APPLE_SIMULATOR_ARCHS
- archs = $$device_archs $$simulator_archs
-
- isEmpty(archs): \
- error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture")
-
- single_arch {
- device_archs = $$first(device_archs)
- simulator_archs = $$first(simulator_archs)
- archs = $$first(archs)
- }
-
- # If we're doing a simulator and device build, device and simulator architectures
- # use different paths and flags for the sysroot and deployment target switch, so we
- # must multiplex them across multiple architectures using -Xarch. Otherwise we fall
- # back to the simple path. This is not strictly necessary but results in cleaner
- # command lines and makes it easier for people to override EXPORT_VALID_ARCHS to
- # limit individual rules to a different set of architecture(s) from the overall
- # build (such as machtest in QtCore).
- simulator:device {
- QMAKE_XARCH_CFLAGS =
- QMAKE_XARCH_LFLAGS =
- QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS
-
- for(arch, archs) {
- contains(simulator_archs, $$arch) {
- sdk = $$simulator.sdk
- version_identifier = $$simulator.deployment_identifier
- } else {
- sdk = $$device.sdk
- version_identifier = $$device.deployment_identifier
- }
-
- version_min_flags = \
- -Xarch_$${arch} \
- -m$${version_identifier}-version-min=$$deployment_target
- QMAKE_XARCH_CFLAGS_$${arch} = $$version_min_flags \
- -Xarch_$${arch} \
- -isysroot$$xcodeSDKInfo(Path, $$sdk)
- QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \
- -Xarch_$${arch} \
- -Wl,-syslibroot,$$xcodeSDKInfo(Path, $$sdk)
-
- QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch})
- QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch})
-
- QMAKE_EXTRA_VARIABLES += \
- QMAKE_XARCH_CFLAGS_$${arch} \
- QMAKE_XARCH_LFLAGS_$${arch}
- }
-
- QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
- QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
- QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS)
- } else {
- simulator: \
- version_identifier = $$simulator.deployment_identifier
- else: \
- version_identifier = $$device.deployment_identifier
- version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
- QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag
- QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag
- QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH $$version_min_flag
- }
-
- # Enable precompiled headers for multiple architectures
- QMAKE_CFLAGS_USE_PRECOMPILE =
- for(arch, archs) {
- QMAKE_CFLAGS_USE_PRECOMPILE += \
- -Xarch_$${arch} \
- -include${QMAKE_PCH_OUTPUT_$${arch}}
- }
- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
- QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
- QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
-
- QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT}
-}
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 634757a653..3ccbbe7061 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -45,6 +45,111 @@ qaxserver {
QT += axserver
}
+!import_qpa_plugin {
+ warning("CONFIG-=import_qpa_plugin is deprecated. Use QTPLUGIN.platforms=- instead.")
+ QTPLUGIN.platforms = -
+} else: qpa_minimal_plugin {
+ warning("CONFIG+=qpa_minimal_plugin is deprecated. Use QTPLUGIN.platforms=qminimal instead.")
+ QTPLUGIN.platforms = qminimal
+}
+
+!force_import_plugins:!contains(TEMPLATE, ".*app"):!if(contains(TEMPLATE, ".*lib"):dll): \
+ CONFIG -= import_plugins
+
+# qmake variables cannot contain dashes, so normalize the names first
+CLEAN_QT = $$replace(QT, -private$, _private)
+CLEAN_QT_PRIVATE = $$replace(QT_PRIVATE, -private$, _private)
+
+qt_module_deps = $$CLEAN_QT $$CLEAN_QT_PRIVATE
+all_qt_module_deps = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_depends")
+
+QTPLUGIN = $$unique($$list($$lower($$QTPLUGIN)))
+
+import_plugins:qtConfig(static) {
+ manualplugs = $$QTPLUGIN # User may specify plugins. Mostly legacy.
+ autoplugs = # Auto-added plugins.
+ # First round: explicitly specified modules.
+ plugin_deps = $$all_qt_module_deps
+ for(ever) {
+ # Automatically link the default plugins for the linked Qt modules.
+ for (qtmod, plugin_deps) {
+ for (ptype, QT.$${qtmod}.plugin_types) {
+ nptype = $$replace(ptype, [-/], _)
+ isEmpty(QTPLUGIN.$$nptype) {
+ for (plug, QT_PLUGINS) {
+ equals(QT_PLUGIN.$${plug}.TYPE, $$ptype) {
+ for (dep, QT_PLUGIN.$${plug}.EXTENDS) {
+ !contains(all_qt_module_deps, $$dep) {
+ plug =
+ break()
+ }
+ }
+ autoplugs += $$plug
+ }
+ }
+ } else {
+ plug = $$eval(QTPLUGIN.$$nptype)
+ !equals(plug, -): \
+ autoplugs += $$plug
+ }
+ }
+ }
+ QTPLUGIN = $$manualplugs $$autoplugs
+ QTPLUGIN = $$unique(QTPLUGIN)
+
+ # Obtain the plugins' Qt dependencies ...
+ plugin_deps =
+ for (plug, QTPLUGIN): \
+ plugin_deps += $$eval(QT_PLUGIN.$${plug}.DEPENDS)
+ plugin_deps = $$resolve_depends(plugin_deps, "QT.", ".depends" ".run_depends")
+ plugin_deps -= $$all_qt_module_deps
+ isEmpty(plugin_deps): \
+ break()
+ # ... and start over if any new Qt modules appeared,
+ # as these may want to load plugins in turn.
+ all_qt_module_deps += $$plugin_deps
+ }
+ extraplugs = $$manualplugs
+ manualplugs -= $$autoplugs
+ extraplugs -= $$manualplugs
+ !isEmpty(extraplugs): \
+ warning("Redundant entries in QTPLUGIN: $$extraplugs")
+
+ !isEmpty(QTPLUGIN) {
+ IMPORT_FILE_CONT = \
+ "// This file is autogenerated by qmake. It imports static plugin classes for" \
+ "// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables." \
+ "$${LITERAL_HASH}include <QtPlugin>"
+ for (plug, QTPLUGIN) {
+ plug_class = $$eval(QT_PLUGIN.$${plug}.CLASS_NAME)
+ !isEmpty(plug_class): \
+ IMPORT_FILE_CONT += "Q_IMPORT_PLUGIN($$plug_class)"
+ else: \
+ warning("Plugin class name could not be determined for plugin '$$plug'.")
+ }
+ IMPORT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_plugin_import.cpp
+ write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error()
+ GENERATED_SOURCES += $$IMPORT_CPP
+ QMAKE_DISTCLEAN += $$IMPORT_CPP
+ }
+}
+
+# Only link against plugins in static builds
+!isEmpty(QTPLUGIN):qtConfig(static) {
+ for (plug, QTPLUGIN) {
+ # Check if the plugin is known to Qt. We can use this to determine
+ # the plugin path. Unknown plugins must rely on the default link path.
+ plug_type = $$eval(QT_PLUGIN.$${plug}.TYPE)
+ !isEmpty(plug_type) {
+ plug_path = $$eval(QT_PLUGIN.$${plug}.PATH)
+ isEmpty(plug_path): \
+ plug_path = $$[QT_INSTALL_PLUGINS/get]
+ LIBS += -L$$plug_path/$$plug_type
+ }
+ LIBS += -l$${plug}$$qtPlatformTargetSuffix()
+ }
+}
+
# target variable, flag source variable
defineTest(qtProcessModuleFlags) {
for(flag, $$2) {
@@ -59,8 +164,6 @@ defineTest(qtProcessModuleFlags) {
unset(using_privates)
var_sfx =
for(ever) {
- # qmake variables cannot contain dashes, so normalize the names first
- CLEAN_QT$$var_sfx = $$replace(QT$$var_sfx, -private$, _private)
# Topological resolution of modules based on their QT.<module>.depends variable
FULL_QT$$var_sfx = $$resolve_depends(CLEAN_QT$$var_sfx, "QT.")
# Finally actually add the modules
@@ -164,11 +267,8 @@ for(ever) {
message("This is not a bug, but a result of using Qt internals. You have been warned!")
}
-qt_module_deps = $$CLEAN_QT $$CLEAN_QT_PRIVATE
-qt_module_deps = $$resolve_depends(qt_module_deps, "QT.")
-
!no_qt_rpath:!static:qtConfig(rpath):!qtConfig(static):\
- contains(qt_module_deps, core) {
+ contains(all_qt_module_deps, core) {
relative_qt_rpath:!isEmpty(QMAKE_REL_RPATH_BASE):contains(INSTALLS, target):\
isEmpty(target.files):isEmpty(target.commands):isEmpty(target.extra) {
# NOT the /dev property, as INSTALLS use host paths
@@ -183,17 +283,17 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.")
# libraries which were NOT specified on the command line.
# This means that paths of direct dependencies (QT & QT_PRIVATE)
# don't need to be listed, unlike their private dependencies' paths.
- privdep = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_depends")
- privdep -= $$qt_module_deps
+ privdep = $$all_qt_module_deps
+ privdep -= $$resolve_depends(qt_module_deps, "QT.")
rpaths =
for(dep, privdep): \
rpaths += $$eval(QT.$${dep}.libs)
QMAKE_RPATHLINKDIR *= $$unique(rpaths)
}
-# static builds: link qml import plugins into the app.
-contains(qt_module_deps, qml): \
- qtConfig(static):contains(TEMPLATE, .*app):!host_build:!no_import_scan {
+# static builds: link qml import plugins into the target.
+contains(all_qt_module_deps, qml): \
+ qtConfig(static):import_plugins:!host_build:!no_import_scan {
exists($$[QT_INSTALL_QML/get]): \
QMLPATHS *= $$[QT_INSTALL_QML/get]
@@ -238,140 +338,5 @@ contains(qt_module_deps, qml): \
write_file($$QML_IMPORT_CPP, IMPORT_FILE_CONT)|error()
GENERATED_SOURCES += $$QML_IMPORT_CPP
QMAKE_DISTCLEAN += $$QML_IMPORT_CPP
-
- # copy qml files. this part is platform spesific.
- mac {
- !shallow_bundle {
- # Note: user can override QMAKE_BUNDLE_QML from pro file to change target bundle path
- isEmpty(QMAKE_QML_BUNDLE_PATH):QMAKE_QML_BUNDLE_PATH = "Resources/qt_qml"
- qmlTargetPath = $$OUT_PWD/$${TARGET}.app/Contents/$$QMAKE_QML_BUNDLE_PATH
- qtconfTargetPath = $$OUT_PWD/$${TARGET}.app/Contents/Resources/qt.conf
- } else {
- # shallow bundle layout (no Contents/Resources)
- isEmpty(QMAKE_QML_BUNDLE_PATH):QMAKE_QML_BUNDLE_PATH = "qt_qml"
- qmlTargetPath = $CODESIGNING_FOLDER_PATH/$$QMAKE_QML_BUNDLE_PATH
- qtconfTargetPath = $CODESIGNING_FOLDER_PATH/qt.conf
- }
-
- # set import path in qt.conf to point to the bundeled qml:
- QT_CONF_CONTENTS = \
- "[Paths]" \
- "Imports = $$QMAKE_QML_BUNDLE_PATH" \
- "Qml2Imports = $$QMAKE_QML_BUNDLE_PATH"
- write_file("$$OUT_PWD/qt.conf", QT_CONF_CONTENTS)|error()
-
- # write qt.conf and copy each qml import dir into the bundle.
- # But strip away archives and other files that are not needed:
- !isEmpty(QMAKE_POST_LINK): QMAKE_POST_LINK += ";"
- QMAKE_POST_LINK += \
- "cp $$shell_quote($$OUT_PWD/qt.conf) \"$$qtconfTargetPath\"; " \
- "test -d \"$$qmlTargetPath\" && rm -r \"$$qmlTargetPath\"; " \
- "mkdir -p \"$$qmlTargetPath\" && " \
- "for p in $$QMLPATHS; do" \
- "rsync -r --exclude='*.a' --exclude='*.prl' --exclude='*.qmltypes' "
- macx-xcode: QMAKE_POST_LINK += "$p/ \"$$qmlTargetPath\"; done"
- else: QMAKE_POST_LINK += "\$\$p/ \"$$qmlTargetPath\"; done"
- }
- }
-}
-
-!import_qpa_plugin {
- warning("CONFIG-=import_qpa_plugin is deprecated. Use QTPLUGIN.platforms=- instead.")
- QTPLUGIN.platforms = -
-} else: qpa_minimal_plugin {
- warning("CONFIG+=qpa_minimal_plugin is deprecated. Use QTPLUGIN.platforms=qminimal instead.")
- QTPLUGIN.platforms = qminimal
-}
-
-contains(TEMPLATE, .*app) {
- autoplugs =
- for (qtmod, qt_module_deps) {
- for (ptype, QT.$${qtmod}.plugin_types) {
- nptype = $$replace(ptype, [-/], _)
- isEmpty(QTPLUGIN.$$nptype) {
- for (plug, QT_PLUGINS) {
- equals(QT_PLUGIN.$${plug}.TYPE, $$ptype) {
- for (dep, QT_PLUGIN.$${plug}.EXTENDS) {
- !contains(qt_module_deps, $$dep) {
- plug =
- break()
- }
- }
- autoplugs += $$plug
- }
- }
- } else {
- plug = $$eval(QTPLUGIN.$$nptype)
- !equals(plug, -): \
- autoplugs += $$plug
- }
- }
- }
- manualplugs = $$QTPLUGIN
- manualplugs -= $$autoplugs
- QTPLUGIN -= $$manualplugs
- !isEmpty(QTPLUGIN): \
- warning("Redundant entries in QTPLUGIN: $$QTPLUGIN")
- QTPLUGIN = $$manualplugs $$autoplugs
-}
-
-QT_PLUGIN_VERIFY = DEPLOYMENT_PLUGIN
-qtConfig(static) {
- QT_PLUGIN_VERIFY += QTPLUGIN
- force_import_plugins|contains(TEMPLATE, .*app) {
- import_plugins:!isEmpty(QTPLUGIN) {
- IMPORT_FILE_CONT = \
- "// This file is autogenerated by qmake. It imports static plugin classes for" \
- "// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables." \
- "$${LITERAL_HASH}include <QtPlugin>"
- for(IMPORT_PLUG, $$list($$unique(QTPLUGIN))) {
- PLUG_CLASS = $$eval(QT_PLUGIN.$${IMPORT_PLUG}.CLASS_NAME)
- !isEmpty(PLUG_CLASS): \
- IMPORT_FILE_CONT += "Q_IMPORT_PLUGIN($$PLUG_CLASS)"
- else: \
- warning("Plugin class name could not be determined for $$IMPORT_PLUG plugin.")
- }
- IMPORT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_plugin_import.cpp
- write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error()
- GENERATED_SOURCES += $$IMPORT_CPP
- QMAKE_DISTCLEAN += $$IMPORT_CPP
- }
- }
-}
-
-for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) {
- for(QTPLUG, $$list($$lower($$unique($$QT_CURRENT_VERIFY)))) {
- # Check if the plugin is known to Qt. We can use this to determine
- # the plugin path. Unknown plugins must rely on the default link path.
- QT_PLUGINPATH = $$eval(QT_PLUGIN.$${QTPLUG}.TYPE)
-
- # Generate the plugin linker line
- QT_LINKAGE = -l$${QTPLUG}$$qtPlatformTargetSuffix()
-
- # Only link against plugin in static builds
- isEqual(QT_CURRENT_VERIFY, QTPLUGIN) {
- !isEmpty(QT_PLUGINPATH) {
- plugpath = $$eval(QT_PLUGIN.$${QTPLUG}.PATH)
- isEmpty(plugpath): \
- plugpath = $$[QT_INSTALL_PLUGINS/get]
- LIBS *= -L$$plugpath/$$QT_PLUGINPATH
- }
- LIBS += $$QT_LINKAGE
- # if the plugin is linked statically there is no need to deploy it
- DEPLOYMENT_PLUGIN -= $$QT_CURRENT_VERIFY
- }
-
- # The following block is currently broken, because qt_plugin_XXX.prf files
- # are not generated for dynamic builds.
- false:isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:winrt {
- QT_ITEM =
- debug: QT_ITEM = $${QTPLUG}d4.dll
- else: QT_ITEM = $${QTPLUG}4.dll
-
- qt_additional_plugin_$${QTPLUG}.files = $$[QT_INSTALL_PLUGINS/get]/$${QT_PLUGINPATH}/$${QT_ITEM}
- qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH}
-
- INSTALLS *= qt_additional_plugin_$${QTPLUG}
- }
}
}
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
index fefd36a7b8..c4c78554b3 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
@@ -19,7 +19,7 @@ qtConfig(c++14): CONFIG += c++14
qtConfig(c++1z): CONFIG += c++1z
contains(TEMPLATE, .*lib) {
# module and plugins
- !host_build:qtConfig(reduce_exports): CONFIG += hide_symbols
+ if(!host_build|!cross_compile):qtConfig(reduce_exports): CONFIG += hide_symbols
unix:qtConfig(reduce_relocations): CONFIG += bsymbolic_functions
qtConfig(separate_debug_info): CONFIG += separate_debug_info
@@ -100,6 +100,9 @@ warnings_are_errors:warning_clean {
# error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
QMAKE_CXXFLAGS_WARN_ON += -Wno-error=strict-overflow
+ # GCC 7 includes -Wimplicit-fallthrough in -Wextra, but Qt is not yet free of implicit fallthroughs.
+ greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-error=implicit-fallthrough
+
# Work-around for bug https://code.google.com/p/android/issues/detail?id=58135
android: QMAKE_CXXFLAGS_WARN_ON += -Wno-error=literal-suffix
}
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index a620e94e97..7d56a7474b 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -183,7 +183,9 @@ defineTest(qtConfCommandline_redo) {
qtConfAddError("No config.opt present - cannot redo configuration.")
return()
}
- QMAKE_EXTRA_ARGS = $$cat($$OUT_PWD/config.opt, lines) $$QMAKE_EXTRA_ARGS
+ QMAKE_EXTRA_REDO_ARGS = $$cat($$OUT_PWD/config.opt, lines)
+ export(QMAKE_EXTRA_REDO_ARGS) # just for config.log
+ QMAKE_EXTRA_ARGS = $$QMAKE_EXTRA_REDO_ARGS $$QMAKE_EXTRA_ARGS
export(QMAKE_EXTRA_ARGS)
QMAKE_REDO_CONFIG = true
export(QMAKE_REDO_CONFIG)
@@ -241,8 +243,8 @@ defineTest(qtConfParseCommandLine) {
opt = $$replace(c, "^--?(disable|no)-(.*)", "\\2")
val = no
} else: contains(c, "^--([^=]+)=(.*)") {
- opt = $$replace(c, "^--?([^=]+)=(.*)", "\\1")
- val = $$replace(c, "^--?([^=]+)=(.*)", "\\2")
+ opt = $$replace(c, "^--([^=]+)=(.*)", "\\1")
+ val = $$replace(c, "^--([^=]+)=(.*)", "\\2")
} else: contains(c, "^--(.*)") {
opt = $$replace(c, "^--(.*)", "\\1")
val = yes
@@ -387,14 +389,17 @@ defineTest(qtConfPkgConfigPackageExists) {
return(true)
}
-defineReplace(qtConfPrepareArgs) {
- arglist = $$split(1)
+defineReplace(qtSystemQuote) {
args =
- for (a, arglist): \
+ for (a, 1): \
args += $$system_quote($$a)
return($$args)
}
+defineReplace(qtConfPrepareArgs) {
+ return($$qtSystemQuote($$split(1)))
+}
+
defineTest(qtConfSetupLibraries) {
for (l, $${currentConfig}.libraries._KEYS_) {
lpfx = $${currentConfig}.libraries.$${l}
@@ -503,12 +508,16 @@ defineTest(qtConfLibrary_makeSpec) {
# the library is found via pkg-config.
defineTest(qtConfLibrary_pkgConfig) {
pkg_config = $$qtConfPkgConfig($$eval($${1}.host))
- isEmpty(pkg_config): \
+ isEmpty(pkg_config) {
+ qtLog("pkg-config use disabled globally.")
return(false)
+ }
args = $$qtConfPrepareArgs($$eval($${1}.args))
- !qtConfPkgConfigPackageExists($$pkg_config, $$args): \
+ !qtConfPkgConfigPackageExists($$pkg_config, $$args) {
+ qtLog("pkg-config did not find package.")
return(false)
+ }
qtRunLoggedCommand("$$pkg_config --modversion $$args", version)|return(false)
qtRunLoggedCommand("$$pkg_config --libs-only-L --libs-only-l $$args", $${1}.libs)|return(false)
@@ -619,8 +628,9 @@ defineTest(qtConfHandleLibrary) {
qtLog("Trying source $$s (type $$t) of library $${1} ...")
- !$$qtConfEvaluate($$eval($${spfx}.condition)) {
- qtLog(" => source failed condition.")
+ cond = $$eval($${spfx}.condition)
+ !$$qtConfEvaluate($$cond) {
+ qtLog(" => source failed condition '$$cond'.")
next()
}
@@ -1367,33 +1377,21 @@ defineTest(qtConfCreateSummary) {
}
defineTest(qtConfPrintReport) {
- for (n, QT_CONFIGURE_REPORT): \
- logn($$n)
- logn()
-
- for (n, QT_CONFIGURE_NOTES) {
- logn($$n)
- logn()
- }
-
- for (w, QT_CONFIGURE_WARNINGS) {
- logn($$w)
- logn()
- }
+ blocks = \
+ "$$join(QT_CONFIGURE_REPORT, $$escape_expand(\\n))" \
+ "$$join(QT_CONFIGURE_NOTES, $$escape_expand(\\n\\n))" \
+ "$$join(QT_CONFIGURE_WARNINGS, $$escape_expand(\\n\\n))"
!isEmpty(QT_CONFIGURE_ERRORS) {
- for (e, QT_CONFIGURE_ERRORS) {
- logn($$e)
- logn()
- }
- mention_config_log:!$$QMAKE_CONFIG_VERBOSE {
- logn("Check config.log for details.")
- logn()
- }
-
- !equals(config.input.continue, yes): \
- error()
+ blocks += "$$join(QT_CONFIGURE_ERRORS, $$escape_expand(\\n\\n))"
+ mention_config_log:!$$QMAKE_CONFIG_VERBOSE: \
+ blocks += "Check config.log for details."
}
+ blocks = "$$join(blocks, $$escape_expand(\\n\\n))"
+ logn($$blocks)
+ !isEmpty(QT_CONFIGURE_ERRORS):!equals(config.input.continue, yes): \
+ error()
+ write_file($$OUT_PWD/config.summary, blocks)|error()
}
defineTest(qtConfCheckErrors) {
@@ -1612,19 +1610,6 @@ defineTest(qtConfOutput_privateFeature) {
}
}
-# command line built-ins post-processing
-defineTest(qtConfOutput_builtins) {
- QMAKE_CONFIG_VERBOSE = $$eval(config.input.verbose)
- isEmpty(QMAKE_CONFIG_VERBOSE): \
- QMAKE_CONFIG_VERBOSE = false
- export(QMAKE_CONFIG_VERBOSE)
-
- QMAKE_CONFIG_CACHE_USE = $$eval(config.input.cache_use)
- isEmpty(QMAKE_CONFIG_CACHE_USE): \
- QMAKE_CONFIG_CACHE_USE = all
- export(QMAKE_CONFIG_CACHE_USE)
-}
-
defineTest(qtConfProcessOneOutput) {
feature = $${1}
fpfx = $${currentConfig}.features.$${feature}
@@ -1709,16 +1694,25 @@ defineTest(qtConfProcessOutput) {
# tie it all together
#
-cfgs =
-isEmpty(_QMAKE_SUPER_CACHE_)|equals(OUT_PWD, $$dirname(_QMAKE_SUPER_CACHE_)) {
- c = $$basename(_PRO_FILE_PWD_)
- config.$${c}.dir = $$_PRO_FILE_PWD_
- cfgs += $$c
- !isEmpty(_QMAKE_SUPER_CACHE_) {
- for (s, SUBDIRS) {
- config.$${s}.dir = $$_PRO_FILE_PWD_/$${s}
- cfgs += $$s
- }
+!isEmpty(_QMAKE_SUPER_CACHE_):!equals(OUT_PWD, $$dirname(_QMAKE_SUPER_CACHE_)) {
+ # sub-repo within a top-level build; no need to configure anything.
+ !isEmpty(QMAKE_EXTRA_ARGS) {
+ # sub-projects don't get the extra args passed down automatically,
+ # so we can use their presence to detect misguided attempts to
+ # configure the repositories separately.
+ # caveat: a plain qmake call is indistinguishable from a recursion
+ # (by design), so we cannot detect this case.
+ error("You cannot configure $$TARGET separately within a top-level build.")
+ }
+ return()
+}
+
+config.$${TARGET}.dir = $$_PRO_FILE_PWD_
+cfgs = $$TARGET
+!isEmpty(_QMAKE_SUPER_CACHE_) {
+ for (s, SUBDIRS) {
+ config.$${s}.dir = $$_PRO_FILE_PWD_/$${s}
+ cfgs += $$s
}
}
configsToProcess =
@@ -1727,8 +1721,11 @@ for (c, cfgs) {
exists($$s/configure.json): \
configsToProcess += $$c
}
-isEmpty(configsToProcess): \
+isEmpty(configsToProcess) {
+ !isEmpty(QMAKE_EXTRA_ARGS): \
+ error("This module does not accept configure command line arguments.")
return()
+}
load(configure_base)
@@ -1771,6 +1768,7 @@ for (currentConfig, allConfigs): \
QMAKE_SAVED_ARGS = $$QMAKE_EXTRA_ARGS
QMAKE_REDO_CONFIG = false
qtConfParseCommandLine()
+qtConfCheckErrors()
for (currentConfig, allConfigs) {
qtConfSetModuleName()
@@ -1784,6 +1782,9 @@ qtConfCheckErrors()
QMAKE_CONFIG_CACHE = $$dirname(_QMAKE_SUPER_CACHE_)/config.cache
else: \
QMAKE_CONFIG_CACHE = $$dirname(_QMAKE_CACHE_)/config.cache
+QMAKE_CONFIG_CACHE_USE = $$eval(config.input.cache_use)
+isEmpty(QMAKE_CONFIG_CACHE_USE): \
+ QMAKE_CONFIG_CACHE_USE = all
!equals(QMAKE_CONFIG_CACHE_USE, none) {
include($$QMAKE_CONFIG_CACHE, , true)
# this crudely determines when to discard the cache. this also catches the case
@@ -1798,9 +1799,17 @@ equals(QMAKE_CONFIG_CACHE_USE, none) {
write_file($$QMAKE_CONFIG_CACHE, cont)
}
+QMAKE_CONFIG_VERBOSE = $$eval(config.input.verbose)
+isEmpty(QMAKE_CONFIG_VERBOSE): \
+ QMAKE_CONFIG_VERBOSE = false
QMAKE_CONFIG_LOG = $$OUT_PWD/config.log
!equals(QMAKE_CONFIG_CACHE_USE, all): \
write_file($$QMAKE_CONFIG_LOG, "")
+else: \
+ write_file($$QMAKE_CONFIG_LOG, $$list($$escape_expand(\\n)), append)
+qtLog("Command line: $$qtSystemQuote($$QMAKE_SAVED_ARGS)")
+$$QMAKE_REDO_CONFIG: \
+ qtLog("config.opt: $$qtSystemQuote($$QMAKE_EXTRA_REDO_ARGS)")
CONFIG += qt_conf_tests_allowed
logn()
@@ -1861,3 +1870,19 @@ for (p, QMAKE_POST_CONFIGURE): \
logn("Configure summary:")
logn()
qtConfPrintReport()
+
+# final notes for the user
+logn()
+logn("Qt is now configured for building. Just run '$$QMAKE_MAKE_NAME'.")
+pfx = $$[QT_INSTALL_PREFIX]
+equals(pfx, $$[QT_INSTALL_PREFIX/get]) {
+ logn("Once everything is built, Qt is installed.")
+ logn("You should NOT run '$$QMAKE_MAKE_NAME install'.")
+} else {
+ logn("Once everything is built, you must run '$$QMAKE_MAKE_NAME install'.")
+ logn("Qt will be installed into '$$system_path($$pfx)'.")
+}
+logn()
+logn("Prior to reconfiguration, make sure you remove any leftovers from")
+logn("the previous build.")
+logn()
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index 23d75182d0..1f14dec0d4 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -211,7 +211,10 @@ android: CONFIG += qt_android_deps no_linker_version_script
} else {
verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API {" \
" qt_private_api_tag*;"
- for(header, SYNCQT.PRIVATE_HEADER_FILES): \
+
+ private_api_headers = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.QPA_HEADER_FILES
+
+ for(header, private_api_headers): \
verscript_content += " @FILE:$${_PRO_FILE_PWD_}/$$header@"
verscript_content += "};"
@@ -232,7 +235,7 @@ android: CONFIG += qt_android_deps no_linker_version_script
verscriptprocess.name = linker version script ${QMAKE_FILE_BASE}
verscriptprocess.input = verscript_in
verscriptprocess.CONFIG += no_link target_predeps
- for(header, SYNCQT.PRIVATE_HEADER_FILES): \
+ for(header, private_api_headers): \
verscriptprocess.depends += $${_PRO_FILE_PWD_}/$$header
verscriptprocess.output = $$verscript
verscriptprocess.commands = perl $${PWD}/data/unix/findclasslist.pl < ${QMAKE_FILE_IN} > $@
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
index 265b4ea8a2..80d9c87e05 100644
--- a/mkspecs/features/qt_plugin.prf
+++ b/mkspecs/features/qt_plugin.prf
@@ -44,9 +44,13 @@ CONFIG(static, static|shared)|prefix_build {
MODULE_FWD_PRI = $$mod_work_pfx/qt_plugin_$${MODULE}.pri
!build_pass {
+ qt_plugin_deps = $$QT $$QT_PRIVATE
+ qt_plugin_deps = s,-private$,_private,g
+
MODULE_PRI_CONT = \
"QT_PLUGIN.$${MODULE}.TYPE = $$PLUGIN_TYPE" \
"QT_PLUGIN.$${MODULE}.EXTENDS =$$join(PLUGIN_EXTENDS, " ", " ")" \
+ "QT_PLUGIN.$${MODULE}.DEPENDS = $$qt_plugin_deps" \
"QT_PLUGIN.$${MODULE}.CLASS_NAME = $$PLUGIN_CLASS_NAME" \
"QT_PLUGINS += $$MODULE"
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
diff --git a/mkspecs/features/qt_targets.prf b/mkspecs/features/qt_targets.prf
index 72429526a7..cd76efdaf3 100644
--- a/mkspecs/features/qt_targets.prf
+++ b/mkspecs/features/qt_targets.prf
@@ -1,4 +1,4 @@
QMAKE_TARGET_COMPANY = The Qt Company Ltd
-QMAKE_TARGET_PRODUCT = Qt5
-QMAKE_TARGET_DESCRIPTION = C++ application development framework.
-QMAKE_TARGET_COPYRIGHT = Copyright (C) 2015 The Qt Company Ltd.
+isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
+isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ application development framework.
+QMAKE_TARGET_COPYRIGHT = Copyright (C) 2017 The Qt Company Ltd.
diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf
index 8678c33ecd..a9fe0d76d6 100644
--- a/mkspecs/features/resolve_target.prf
+++ b/mkspecs/features/resolve_target.prf
@@ -19,7 +19,6 @@ win32 {
contains(TEMPLATE, .*lib) {
!skip_target_version_ext:isEmpty(TARGET_VERSION_EXT):!isEmpty(VERSION) {
TARGET_VERSION_EXT = $$section(VERSION, ., 0, 0)
- isEqual(TARGET_VERSION_EXT, 0):unset(TARGET_VERSION_EXT)
}
static:TARGET_EXT = .lib
else:TARGET_EXT = .dll
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
index adc8e9a8ac..de769b4b86 100644
--- a/mkspecs/features/resources.prf
+++ b/mkspecs/features/resources.prf
@@ -19,7 +19,7 @@ defineReplace(xml_escape) {
RESOURCES += qmake_immediate
for(resource, RESOURCES) {
# Regular case of user qrc file
- contains(resource, ".*\.qrc$"): \
+ contains(resource, ".*\\.qrc$"): \
next()
# Fallback for stand-alone files/directories
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
index 0ef0fa8fc7..15b0829235 100644
--- a/mkspecs/features/toolchain.prf
+++ b/mkspecs/features/toolchain.prf
@@ -12,7 +12,12 @@ defineReplace(qtMakeExpand) {
}
}
-isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build {
+cross_compile:host_build: \
+ target_prefix = QMAKE_HOST_CXX
+else: \
+ target_prefix = QMAKE_CXX
+
+isEmpty($${target_prefix}.INCDIRS) {
#
# Get default include and library paths from compiler
#
@@ -44,6 +49,8 @@ isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build {
}
QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS)
} else: msvc {
+ # This doesn't differentiate between host and target,
+ # but neither do the compilers.
LIB = $$getenv("LIB")
QMAKE_DEFAULT_LIBDIRS = $$split(LIB, $$QMAKE_DIRLIST_SEP)
INCLUDE = $$getenv("INCLUDE")
@@ -55,6 +62,101 @@ isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build {
isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib
}
- !isEmpty(QMAKE_DEFAULT_INCDIRS): cache(QMAKE_DEFAULT_INCDIRS, set stash)
- !isEmpty(QMAKE_DEFAULT_LIBDIRS): cache(QMAKE_DEFAULT_LIBDIRS, set stash)
+ cache($${target_prefix}.INCDIRS, set stash, QMAKE_DEFAULT_INCDIRS)
+ cache($${target_prefix}.LIBDIRS, set stash, QMAKE_DEFAULT_LIBDIRS)
+} else {
+ QMAKE_DEFAULT_INCDIRS = $$eval($${target_prefix}.INCDIRS)
+ QMAKE_DEFAULT_LIBDIRS = $$eval($${target_prefix}.LIBDIRS)
+}
+
+#
+# Determine and cache the compiler version
+#
+
+defineReplace(qtVariablesFromMSVC) {
+ return($$system("$$1 -nologo -E $$2 $$system_quote($$PWD/data/macros.cpp) <NUL 2>NUL", lines))
+}
+
+defineReplace(qtVariablesFromGCC) {
+ null_device = /dev/null
+ equals(QMAKE_HOST.os, Windows): null_device = NUL
+ return($$system("$$1 -E $$system_quote($$PWD/data/macros.cpp) <$$null_device 2>$$null_device", lines))
+}
+
+isEmpty($${target_prefix}.COMPILER_MACROS) {
+ msvc {
+ clang_cl {
+ # We need to obtain the cl.exe version first
+ vars = $$qtVariablesFromMSVC(cl)
+ for (v, vars) {
+ isEmpty(v)|contains(v, $${LITERAL_HASH}.*): next()
+ eval($$v)
+ }
+ isEmpty(QMAKE_MSC_FULL_VER): error("Could not determine the Visual Studio version")
+
+ QMAKE_CFLAGS_MSVC_COMPAT = $$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", \
+ "-fms-compatibility-version=\\1.\\2.\\3")
+ cache($${target_prefix}.QMAKE_CFLAGS_MSVC_COMPAT, set stash, QMAKE_CFLAGS_MSVC_COMPAT)
+ $${target_prefix}.COMPILER_MACROS += QMAKE_CFLAGS_MSVC_COMPAT
+ vars = $$qtVariablesFromMSVC($$QMAKE_CXX, $$QMAKE_CFLAGS_MSVC_COMPAT)
+ } else {
+ vars = $$qtVariablesFromMSVC($$QMAKE_CXX)
+ }
+ } else: gcc {
+ vars = $$qtVariablesFromGCC($$QMAKE_CXX)
+ }
+ for (v, vars) {
+ isEmpty(v)|contains(v, $${LITERAL_HASH}.*): next()
+ # Set both <varname> for the outer scope ...
+ eval($$v)
+ v ~= s/ .*//
+ isEmpty($$v): error("Compiler produced empty value for $${v}.")
+ # ... and save QMAKE_(HOST_)?CXX.<varname> in the cache.
+ cache($${target_prefix}.$$v, set stash, $$v)
+ $${target_prefix}.COMPILER_MACROS += $$v
+ }
+ cache($${target_prefix}.COMPILER_MACROS, set stash)
+} else {
+ # load from the cache
+ for (i, $${target_prefix}.COMPILER_MACROS): \
+ $$i = $$eval($${target_prefix}.$$i)
+}
+
+unset(target_prefix)
+
+# Populate QMAKE_COMPILER_DEFINES and some compatibility variables.
+# The $$format_number() calls strip leading zeros to avoid misinterpretation as octal.
+!isEmpty(QMAKE_MSC_VER) {
+ QMAKE_COMPILER_DEFINES += _MSC_VER=$$QMAKE_MSC_VER _MSC_FULL_VER=$$QMAKE_MSC_FULL_VER
+ QT_MSVC_MAJOR_VERSION = $$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\1")
+ QT_MSVC_MINOR_VERSION = $$format_number($$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\2"))
+ QT_MSVC_PATCH_VERSION = $$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\3"))
+}
+!isEmpty(QMAKE_ICC_VER) {
+ QMAKE_COMPILER_DEFINES += __INTEL_COMPILER=$$QMAKE_ICC_VER __INTEL_COMPILER_UPDATE=$$QMAKE_ICC_UPDATE_VER
+ QT_ICC_MAJOR_VERSION = $$replace(QMAKE_ICC_VER, "(..)(..)", "\\1")
+ QT_ICC_MINOR_VERSION = $$format_number($$replace(QMAKE_ICC_VER, "(..)(..)", "\\2"))
+ QT_ICC_PATCH_VERSION = $$QMAKE_ICC_UPDATE_VER
}
+!isEmpty(QMAKE_APPLE_CC): \
+ QMAKE_COMPILER_DEFINES += __APPLE_CC__=$$QMAKE_APPLE_CC
+!isEmpty(QT_APPLE_CLANG_MAJOR_VERSION): \
+ QMAKE_COMPILER_DEFINES += __clang__ \
+ __clang_major__=$$QT_APPLE_CLANG_MAJOR_VERSION \
+ __clang_minor__=$$QT_APPLE_CLANG_MINOR_VERSION \
+ __clang_patchlevel__=$$QT_APPLE_CLANG_PATCH_VERSION
+!isEmpty(QT_CLANG_MAJOR_VERSION): \
+ QMAKE_COMPILER_DEFINES += __clang__ \
+ __clang_major__=$$QT_CLANG_MAJOR_VERSION \
+ __clang_minor__=$$QT_CLANG_MINOR_VERSION \
+ __clang_patchlevel__=$$QT_CLANG_PATCH_VERSION
+!isEmpty(QT_GCC_MAJOR_VERSION): \
+ QMAKE_COMPILER_DEFINES += \
+ __GNUC__=$$QT_GCC_MAJOR_VERSION \
+ __GNUC_MINOR__=$$QT_GCC_MINOR_VERSION \
+ __GNUC_PATCHLEVEL__=$$QT_GCC_PATCH_VERSION
+
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_MSVC_COMPAT
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_MSVC_COMPAT
+
+msvc:!intel_icl:!clang_cl: include(../common/msvc-version.conf)
diff --git a/mkspecs/features/win32/default_pre.prf b/mkspecs/features/win32/default_pre.prf
index 385184f632..bdb72c0d89 100644
--- a/mkspecs/features/win32/default_pre.prf
+++ b/mkspecs/features/win32/default_pre.prf
@@ -1,3 +1,2 @@
CONFIG = rtti_off incremental_off windows $$CONFIG
load(default_pre)
-
diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf
index a1288367af..8f4a7a6eab 100644
--- a/mkspecs/features/winrt/package_manifest.prf
+++ b/mkspecs/features/winrt/package_manifest.prf
@@ -93,7 +93,7 @@
isEmpty(WINRT_MANIFEST.background): WINRT_MANIFEST.background = green
isEmpty(WINRT_MANIFEST.foreground): WINRT_MANIFEST.foreground = light
isEmpty(WINRT_MANIFEST.default_language): WINRT_MANIFEST.default_language = en
- *-msvc2015 {
+ *-msvc2015|*-msvc2017 {
isEmpty(WINRT_MANIFEST.minVersion): WINRT_MANIFEST.minVersion = $$(UCRTVersion)
isEmpty(WINRT_MANIFEST.minVersion): error("No UCRTVersion found in environment."))
isEmpty(WINRT_MANIFEST.maxVersionTested): WINRT_MANIFEST.maxVersionTested = $$WINRT_MANIFEST.minVersion
@@ -116,7 +116,7 @@
# All Windows 10 applications need to have internetClient. It is also not marked as additional
# capability anymore and is assumed to be standard.
- *-msvc2015: WINRT_MANIFEST.capabilities += internetClient
+ *-msvc2015|*-msvc2017: WINRT_MANIFEST.capabilities += internetClient
contains(WINRT_MANIFEST.capabilities, defaults) {
WINRT_MANIFEST.capabilities -= defaults
@@ -143,7 +143,7 @@
}
# Dependencies are given as a string list. The CRT dependency is added automatically above.
- # For MSVC2015 the dependencies are added in conjunction with TargetDeviceFamily
+ # For MSVC2015/2017 the dependencies are added in conjunction with TargetDeviceFamily
# Due to the hard coded dependency on "Windows.Universal" the <Dependencies> tag
# is already inside the MSVC2015 manifest.
WINRT_MANIFEST.dependencies = $$unique(WINRT_MANIFEST.dependencies)
diff --git a/mkspecs/win32-clang-msvc2015/qmake.conf b/mkspecs/win32-clang-msvc/qmake.conf
index 73cfdcbab9..0041788ef9 100644
--- a/mkspecs/win32-clang-msvc2015/qmake.conf
+++ b/mkspecs/win32-clang-msvc/qmake.conf
@@ -1,13 +1,9 @@
#
-# qmake configuration for win32-clang-msvc2015
-
+# qmake configuration for win32-clang-msvc
#
-# Written for Clang 3.8 with Microsoft Visual C++ 2015 Update 1
# Notice: this uses the clang-cl wrapper
#
-MSC_VER = 1900
-MSVC_VER = 14.0
include(../common/msvc-desktop.conf)
QMAKE_COMPILER += clang_cl llvm
@@ -15,7 +11,7 @@ QMAKE_COMPILER += clang_cl llvm
QMAKE_CC = clang-cl
QMAKE_CXX = $$QMAKE_CC
-QMAKE_CFLAGS += -fms-compatibility-version=19.00.23506 -Wno-microsoft-enum-value
+QMAKE_CFLAGS += -Wno-microsoft-enum-value
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
# Precompiled headers are not supported yet by clang
diff --git a/mkspecs/win32-msvc2012/qplatformdefs.h b/mkspecs/win32-clang-msvc/qplatformdefs.h
index 9c59826555..8a3afa7630 100644
--- a/mkspecs/win32-msvc2012/qplatformdefs.h
+++ b/mkspecs/win32-clang-msvc/qplatformdefs.h
@@ -37,4 +37,4 @@
**
****************************************************************************/
-#include "../win32-msvc2005/qplatformdefs.h"
+#include "../win32-msvc/qplatformdefs.h"
diff --git a/mkspecs/win32-clang-msvc2015/qplatformdefs.h b/mkspecs/win32-clang-msvc2015/qplatformdefs.h
deleted file mode 100644
index 7100e3aa41..0000000000
--- a/mkspecs/win32-clang-msvc2015/qplatformdefs.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../win32-msvc2005/qplatformdefs.h"
diff --git a/mkspecs/win32-icc/qplatformdefs.h b/mkspecs/win32-icc/qplatformdefs.h
index 9c59826555..8a3afa7630 100644
--- a/mkspecs/win32-icc/qplatformdefs.h
+++ b/mkspecs/win32-icc/qplatformdefs.h
@@ -37,4 +37,4 @@
**
****************************************************************************/
-#include "../win32-msvc2005/qplatformdefs.h"
+#include "../win32-msvc/qplatformdefs.h"
diff --git a/mkspecs/win32-msvc/qmake.conf b/mkspecs/win32-msvc/qmake.conf
new file mode 100644
index 0000000000..1d8b8f0e97
--- /dev/null
+++ b/mkspecs/win32-msvc/qmake.conf
@@ -0,0 +1,8 @@
+#
+# qmake configuration for win32-msvc
+#
+# Written for Microsoft Visual C++ (all desktop versions)
+#
+
+include(../common/msvc-desktop.conf)
+load(qt_config)
diff --git a/mkspecs/win32-msvc2005/qplatformdefs.h b/mkspecs/win32-msvc/qplatformdefs.h
index 9573d18a40..9573d18a40 100644
--- a/mkspecs/win32-msvc2005/qplatformdefs.h
+++ b/mkspecs/win32-msvc/qplatformdefs.h
diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf
deleted file mode 100644
index 458f37cc04..0000000000
--- a/mkspecs/win32-msvc2005/qmake.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# qmake configuration for win32-msvc2005
-#
-# Written for Microsoft Visual C++ 2005
-#
-
-MSC_VER = 1400
-MSVC_VER = 8.0
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf
deleted file mode 100644
index d1382ff2d4..0000000000
--- a/mkspecs/win32-msvc2008/qmake.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# qmake configuration for win32-msvc2008
-#
-# Written for Microsoft Visual C++ 2008
-#
-
-MSC_VER = 1500
-MSVC_VER = 9.0
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2008/qplatformdefs.h b/mkspecs/win32-msvc2008/qplatformdefs.h
deleted file mode 100644
index 9c59826555..0000000000
--- a/mkspecs/win32-msvc2008/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../win32-msvc2005/qplatformdefs.h"
diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf
deleted file mode 100644
index 3ad9d478ee..0000000000
--- a/mkspecs/win32-msvc2010/qmake.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# qmake configuration for win32-msvc2010
-#
-# Written for Microsoft Visual C++ 2010
-#
-
-MSC_VER = 1600
-MSVC_VER = 10.0
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2012/qmake.conf b/mkspecs/win32-msvc2012/qmake.conf
deleted file mode 100644
index 3d9c5864af..0000000000
--- a/mkspecs/win32-msvc2012/qmake.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# qmake configuration for win32-msvc2012
-#
-# Written for Microsoft Visual C++ 2012
-#
-
-MSC_VER = 1700
-MSVC_VER = 11.0
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2013/qmake.conf b/mkspecs/win32-msvc2013/qmake.conf
deleted file mode 100644
index 34108b2c32..0000000000
--- a/mkspecs/win32-msvc2013/qmake.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# qmake configuration for win32-msvc2013
-#
-# Written for Microsoft Visual C++ 2013
-#
-
-MSC_VER = 1800
-MSVC_VER = 12.0
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2015/qmake.conf b/mkspecs/win32-msvc2015/qmake.conf
deleted file mode 100644
index ea654d4296..0000000000
--- a/mkspecs/win32-msvc2015/qmake.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# qmake configuration for win32-msvc2015
-#
-# Written for Microsoft Visual C++ 2015
-#
-
-MSC_VER = 1900
-MSVC_VER = 14.0
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2015/qplatformdefs.h b/mkspecs/win32-msvc2015/qplatformdefs.h
deleted file mode 100644
index 9c59826555..0000000000
--- a/mkspecs/win32-msvc2015/qplatformdefs.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../win32-msvc2005/qplatformdefs.h"
diff --git a/mkspecs/win32-msvc2017/qmake.conf b/mkspecs/win32-msvc2017/qmake.conf
deleted file mode 100644
index b8351eb3fe..0000000000
--- a/mkspecs/win32-msvc2017/qmake.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# qmake configuration for win32-msvc2017
-#
-# Written for Microsoft Visual C++ 2017
-#
-
-MSC_VER = 1910
-MSVC_VER = 15.0
-include(../common/msvc-desktop.conf)
-load(qt_config)
diff --git a/mkspecs/win32-msvc2017/qplatformdefs.h b/mkspecs/win32-msvc2017/qplatformdefs.h
deleted file mode 100644
index 7100e3aa41..0000000000
--- a/mkspecs/win32-msvc2017/qplatformdefs.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the qmake spec of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL21$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../win32-msvc2005/qplatformdefs.h"
diff --git a/mkspecs/winrt-arm-msvc2015/qmake.conf b/mkspecs/winrt-arm-msvc2015/qmake.conf
index 7a9375246d..8bca6f4af8 100644
--- a/mkspecs/winrt-arm-msvc2015/qmake.conf
+++ b/mkspecs/winrt-arm-msvc2015/qmake.conf
@@ -4,9 +4,7 @@
# Written for Microsoft Visual C++ 2015
#
-MSC_VER = 1900
include(../common/winrt_winphone/qmake.conf)
-QMAKE_COMPILER_DEFINES += _MSC_VER=1900
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 ARM __ARM__ __arm__
QMAKE_CFLAGS += -FS
@@ -16,7 +14,6 @@ QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
VCPROJ_ARCH = ARM
-MSVC_VER = 14.0
WINSDK_VER = 10.0
WINTARGET_VER = winv10.0
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
diff --git a/mkspecs/winrt-x64-msvc2015/qmake.conf b/mkspecs/winrt-x64-msvc2015/qmake.conf
index ca2dc88bf0..d503399e3c 100644
--- a/mkspecs/winrt-x64-msvc2015/qmake.conf
+++ b/mkspecs/winrt-x64-msvc2015/qmake.conf
@@ -4,9 +4,7 @@
# Written for Microsoft Visual C++ 2015
#
-MSC_VER = 1900
include(../common/winrt_winphone/qmake.conf)
-QMAKE_COMPILER_DEFINES += _MSC_VER=1900 _WIN32
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__
QMAKE_CFLAGS += -FS
@@ -16,7 +14,6 @@ QMAKE_LFLAGS += /MACHINE:X64 /NODEFAULTLIB:kernel32.lib
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
VCPROJ_ARCH = x64
-MSVC_VER = 14.0
WINSDK_VER = 10.0
WINTARGET_VER = winv10.0
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
diff --git a/mkspecs/winrt-x64-msvc2017/qmake.conf b/mkspecs/winrt-x64-msvc2017/qmake.conf
new file mode 100644
index 0000000000..cb2209fa23
--- /dev/null
+++ b/mkspecs/winrt-x64-msvc2017/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for winrt-x64-msvc2017
+#
+# Written for Microsoft Visual C++ 2017
+#
+
+include(../common/winrt_winphone/qmake.conf)
+DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__
+
+QMAKE_CFLAGS += -FS
+QMAKE_CXXFLAGS += -FS
+QMAKE_LFLAGS += /MACHINE:X64 /NODEFAULTLIB:kernel32.lib
+
+QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
+
+VCPROJ_ARCH = x64
+WINSDK_VER = 10.0
+WINTARGET_VER = winv10.0
+WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
+WINRT_MANIFEST.architecture = x64
diff --git a/mkspecs/win32-msvc2010/qplatformdefs.h b/mkspecs/winrt-x64-msvc2017/qplatformdefs.h
index 9c59826555..2a1aef5e88 100644
--- a/mkspecs/win32-msvc2010/qplatformdefs.h
+++ b/mkspecs/winrt-x64-msvc2017/qplatformdefs.h
@@ -37,4 +37,4 @@
**
****************************************************************************/
-#include "../win32-msvc2005/qplatformdefs.h"
+#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-x86-msvc2015/qmake.conf b/mkspecs/winrt-x86-msvc2015/qmake.conf
index 3b2681e93d..37ce0e5525 100644
--- a/mkspecs/winrt-x86-msvc2015/qmake.conf
+++ b/mkspecs/winrt-x86-msvc2015/qmake.conf
@@ -4,9 +4,7 @@
# Written for Microsoft Visual C++ 2015
#
-MSC_VER = 1900
include(../common/winrt_winphone/qmake.conf)
-QMAKE_COMPILER_DEFINES += _MSC_VER=1900 _WIN32
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__
QMAKE_CFLAGS += -FS
@@ -15,7 +13,6 @@ QMAKE_LFLAGS += /SAFESEH /MACHINE:X86 /NODEFAULTLIB:kernel32.lib
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
VCPROJ_ARCH = Win32
-MSVC_VER = 14.0
WINSDK_VER = 10.0
WINTARGET_VER = winv10.0
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
diff --git a/mkspecs/winrt-x86-msvc2017/qmake.conf b/mkspecs/winrt-x86-msvc2017/qmake.conf
new file mode 100644
index 0000000000..3c9506bbad
--- /dev/null
+++ b/mkspecs/winrt-x86-msvc2017/qmake.conf
@@ -0,0 +1,19 @@
+#
+# qmake configuration for winrt-x86-msvc2017
+#
+# Written for Microsoft Visual C++ 2017
+#
+
+include(../common/winrt_winphone/qmake.conf)
+DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__
+
+QMAKE_CFLAGS += -FS
+QMAKE_CXXFLAGS += -FS
+QMAKE_LFLAGS += /SAFESEH /MACHINE:X86 /NODEFAULTLIB:kernel32.lib
+
+QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
+VCPROJ_ARCH = Win32
+WINSDK_VER = 10.0
+WINTARGET_VER = winv10.0
+WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
+WINRT_MANIFEST.architecture = x86
diff --git a/mkspecs/win32-msvc2013/qplatformdefs.h b/mkspecs/winrt-x86-msvc2017/qplatformdefs.h
index 9c59826555..2a1aef5e88 100644
--- a/mkspecs/win32-msvc2013/qplatformdefs.h
+++ b/mkspecs/winrt-x86-msvc2017/qplatformdefs.h
@@ -37,4 +37,4 @@
**
****************************************************************************/
-#include "../win32-msvc2005/qplatformdefs.h"
+#include "../common/winrt_winphone/qplatformdefs.h"