summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/android-clang/qplatformdefs.h2
-rw-r--r--mkspecs/android-g++/qplatformdefs.h2
-rw-r--r--mkspecs/common/clang-mac.conf1
-rw-r--r--mkspecs/common/ios.conf6
-rw-r--r--mkspecs/common/ios/qmake.conf2
-rw-r--r--mkspecs/common/linux-android.conf1
-rw-r--r--mkspecs/common/linux.conf6
-rw-r--r--mkspecs/common/mac.conf6
-rw-r--r--mkspecs/common/msvc-base.conf2
-rw-r--r--mkspecs/common/qcc-base-qnx.conf3
-rw-r--r--mkspecs/common/tvos.conf20
-rw-r--r--mkspecs/common/uikit.conf11
-rw-r--r--mkspecs/common/uikit/GLES2/gl2.h (renamed from mkspecs/common/ios/GLES2/gl2.h)0
-rw-r--r--mkspecs/common/watchos.conf20
-rw-r--r--mkspecs/common/wince/qmake.conf84
-rw-r--r--mkspecs/common/wince/qplatformdefs.h129
-rw-r--r--mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in2
-rw-r--r--mkspecs/common/winrt_winphone/qmake.conf3
-rw-r--r--mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp2
-rw-r--r--mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf4
-rw-r--r--mkspecs/devices/linux-colibri-vf-g++/qmake.conf17
-rw-r--r--mkspecs/devices/linux-colibri-vf-g++/qplatformdefs.h (renamed from mkspecs/wince70embedded-x86-msvc2008/qplatformdefs.h)3
-rw-r--r--mkspecs/devices/linux-rpi3-g++/qmake.conf7
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf2
-rw-r--r--mkspecs/features/configure.prf40
-rw-r--r--mkspecs/features/configure_base.prf51
-rw-r--r--mkspecs/features/create_cmake.prf4
-rw-r--r--mkspecs/features/ctest_testcase_common.prf5
-rw-r--r--mkspecs/features/default_pre.prf2
-rw-r--r--mkspecs/features/java.prf2
-rw-r--r--mkspecs/features/mac/default_post.prf4
-rw-r--r--mkspecs/features/mac/default_pre.prf2
-rw-r--r--mkspecs/features/mac/sdk.prf83
-rw-r--r--mkspecs/features/moc.prf33
-rw-r--r--mkspecs/features/no_debug_info.prf3
-rw-r--r--mkspecs/features/qfeatures.prf4
-rw-r--r--mkspecs/features/qmake_use.prf28
-rw-r--r--mkspecs/features/qml_plugin.prf5
-rw-r--r--mkspecs/features/qpa/basicunixfontdatabase.prf3
-rw-r--r--mkspecs/features/qpa/genericunixfontdatabase.prf6
-rw-r--r--mkspecs/features/qt.prf22
-rw-r--r--mkspecs/features/qt_android_deps.prf2
-rw-r--r--mkspecs/features/qt_app.prf28
-rw-r--r--mkspecs/features/qt_build_config.prf27
-rw-r--r--mkspecs/features/qt_build_extra.prf3
-rw-r--r--mkspecs/features/qt_common.prf15
-rw-r--r--mkspecs/features/qt_configure.prf1785
-rw-r--r--mkspecs/features/qt_docs.prf15
-rw-r--r--mkspecs/features/qt_functions.prf35
-rw-r--r--mkspecs/features/qt_helper_lib.prf32
-rw-r--r--mkspecs/features/qt_installs.prf2
-rw-r--r--mkspecs/features/qt_module.prf44
-rw-r--r--mkspecs/features/qt_module_headers.prf42
-rw-r--r--mkspecs/features/qt_module_pris.prf47
-rw-r--r--mkspecs/features/qt_parts.prf5
-rw-r--r--mkspecs/features/qt_plugin.prf12
-rw-r--r--mkspecs/features/qt_tool.prf3
-rw-r--r--mkspecs/features/resolve_config.prf2
-rw-r--r--mkspecs/features/resources.prf2
-rw-r--r--mkspecs/features/spec_pre.prf2
-rw-r--r--mkspecs/features/testcase.prf9
-rw-r--r--mkspecs/features/toolchain.prf17
-rw-r--r--mkspecs/features/uikit/bitcode.prf15
-rw-r--r--mkspecs/features/uikit/default_post.prf100
-rw-r--r--mkspecs/features/uikit/default_pre.prf25
-rwxr-xr-xmkspecs/features/uikit/device_destinations.sh (renamed from mkspecs/macx-ios-clang/ios_destinations.sh)18
-rwxr-xr-xmkspecs/features/uikit/devices.pl (renamed from mkspecs/macx-ios-clang/ios_devices.pl)0
-rw-r--r--mkspecs/features/uikit/exclusive_builds_post.prf (renamed from mkspecs/macx-ios-clang/features/exclusive_builds_post.prf)0
-rw-r--r--mkspecs/features/uikit/qt.prf (renamed from mkspecs/macx-ios-clang/features/qt.prf)22
-rw-r--r--mkspecs/features/uikit/qt_config.prf (renamed from mkspecs/macx-ios-clang/features/qt_config.prf)9
-rw-r--r--mkspecs/features/uikit/qt_parts.prf (renamed from mkspecs/macx-ios-clang/features/qt_parts.prf)0
-rw-r--r--mkspecs/features/uikit/resolve_config.prf17
-rw-r--r--mkspecs/features/uikit/sdk.prf (renamed from mkspecs/macx-ios-clang/features/sdk.prf)11
-rw-r--r--mkspecs/features/uikit/testcase.prf (renamed from mkspecs/macx-ios-clang/features/testcase.prf)0
-rw-r--r--mkspecs/features/uikit/testcase_targets.prf (renamed from mkspecs/macx-ios-clang/features/testcase_targets.prf)0
-rw-r--r--mkspecs/features/uikit/xcodebuild.mk (renamed from mkspecs/macx-ios-clang/xcodebuild.mk)33
-rw-r--r--mkspecs/features/uikit/xcodebuild.prf (renamed from mkspecs/macx-ios-clang/features/xcodebuild.prf)28
-rw-r--r--mkspecs/features/unix/opengl.prf2
-rw-r--r--mkspecs/features/unix/openvg.prf4
-rw-r--r--mkspecs/features/win32/console.prf3
-rw-r--r--mkspecs/features/win32/opengl.prf41
-rw-r--r--mkspecs/features/win32/openvg.prf2
-rw-r--r--mkspecs/features/win32/qt_config.prf10
-rw-r--r--mkspecs/features/win32/windows.prf2
-rw-r--r--mkspecs/features/winrt/default_pre.prf14
-rw-r--r--mkspecs/features/winrt/package_manifest.prf246
-rw-r--r--mkspecs/haiku-g++/qmake.conf3
-rw-r--r--mkspecs/hurd-g++/qmake.conf4
-rw-r--r--mkspecs/integrity-armv7-imx6/qmake.conf1
-rw-r--r--mkspecs/integrity-armv7/qmake.conf1
-rw-r--r--mkspecs/integrity-x86/qmake.conf1
-rw-r--r--mkspecs/macx-clang-32/qmake.conf6
-rw-r--r--mkspecs/macx-clang/qmake.conf6
-rw-r--r--mkspecs/macx-g++-32/qmake.conf2
-rw-r--r--mkspecs/macx-g++/qmake.conf2
-rw-r--r--mkspecs/macx-g++40/qmake.conf2
-rw-r--r--mkspecs/macx-g++42/qmake.conf2
-rw-r--r--mkspecs/macx-ios-clang/Info.plist.lib2
-rw-r--r--mkspecs/macx-ios-clang/features/default_post.prf90
-rw-r--r--mkspecs/macx-ios-clang/features/default_pre.prf21
-rw-r--r--mkspecs/macx-ios-clang/features/resolve_config.prf72
-rw-r--r--mkspecs/macx-ios-clang/qmake.conf16
-rw-r--r--mkspecs/macx-llvm/qmake.conf2
-rw-r--r--mkspecs/macx-tvos-clang/Info.plist.app41
-rw-r--r--mkspecs/macx-tvos-clang/Info.plist.lib22
-rw-r--r--mkspecs/macx-tvos-clang/qmake.conf21
-rw-r--r--mkspecs/macx-tvos-clang/qplatformdefs.h34
-rw-r--r--mkspecs/macx-watchos-clang/Info.plist.app35
-rw-r--r--mkspecs/macx-watchos-clang/Info.plist.lib22
-rw-r--r--mkspecs/macx-watchos-clang/qmake.conf21
-rw-r--r--mkspecs/macx-watchos-clang/qplatformdefs.h34
-rw-r--r--mkspecs/qnx-aarch64le-qcc/qmake.conf4
-rw-r--r--mkspecs/qnx-armle-v7-qcc/qmake.conf2
-rw-r--r--mkspecs/qnx-x86-64-qcc/qmake.conf4
-rw-r--r--mkspecs/qnx-x86-qcc/qmake.conf2
-rw-r--r--mkspecs/wince60standard-armv4i-msvc2005/qmake.conf27
-rw-r--r--mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h41
-rw-r--r--mkspecs/wince60standard-x86-msvc2005/qmake.conf27
-rw-r--r--mkspecs/wince60standard-x86-msvc2005/qplatformdefs.h41
-rw-r--r--mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf29
-rw-r--r--mkspecs/wince70embedded-armv4i-msvc2008/qplatformdefs.h41
-rw-r--r--mkspecs/wince70embedded-x86-msvc2008/qmake.conf27
-rw-r--r--mkspecs/wince80colibri-armv7-msvc2012/qmake.conf45
-rw-r--r--mkspecs/wince80colibri-armv7-msvc2012/qplatformdefs.h41
124 files changed, 2965 insertions, 1192 deletions
diff --git a/mkspecs/android-clang/qplatformdefs.h b/mkspecs/android-clang/qplatformdefs.h
index 9d3820fa27..9a8d176285 100644
--- a/mkspecs/android-clang/qplatformdefs.h
+++ b/mkspecs/android-clang/qplatformdefs.h
@@ -34,8 +34,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
-#define QT_QPA_DEFAULT_PLATFORM_NAME "android"
-
// Get Qt defines/settings
#include "qglobal.h"
diff --git a/mkspecs/android-g++/qplatformdefs.h b/mkspecs/android-g++/qplatformdefs.h
index 1d4fa2ba5b..068f437c11 100644
--- a/mkspecs/android-g++/qplatformdefs.h
+++ b/mkspecs/android-g++/qplatformdefs.h
@@ -40,8 +40,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
-#define QT_QPA_DEFAULT_PLATFORM_NAME "android"
-
// Get Qt defines/settings
#include "qglobal.h"
diff --git a/mkspecs/common/clang-mac.conf b/mkspecs/common/clang-mac.conf
index c616e20b6e..274fd73d00 100644
--- a/mkspecs/common/clang-mac.conf
+++ b/mkspecs/common/clang-mac.conf
@@ -8,3 +8,4 @@ QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvm.clang.1_0
QMAKE_CXXFLAGS += -stdlib=libc++
QMAKE_LFLAGS += -stdlib=libc++
+QMAKE_AR_LTCG = libtool -static -o
diff --git a/mkspecs/common/ios.conf b/mkspecs/common/ios.conf
index f8f810d4f0..dd9b29f9e2 100644
--- a/mkspecs/common/ios.conf
+++ b/mkspecs/common/ios.conf
@@ -6,15 +6,15 @@ QMAKE_PLATFORM += ios
QMAKE_MAC_SDK = iphoneos
simulator.sdk = iphonesimulator
-simulator.target = $${simulator.sdk}
+simulator.target = simulator
simulator.dir_affix = $${simulator.sdk}
simulator.CONFIG = $${simulator.sdk}
simulator.deployment_identifier = ios-simulator
device.sdk = iphoneos
-device.target = $${device.sdk}
+device.target = device
device.dir_affix = $${device.sdk}
device.CONFIG = $${device.sdk}
device.deployment_identifier = $${device.sdk}
-include(mac.conf)
+include(uikit.conf)
diff --git a/mkspecs/common/ios/qmake.conf b/mkspecs/common/ios/qmake.conf
index daf66ac5ea..b579562236 100644
--- a/mkspecs/common/ios/qmake.conf
+++ b/mkspecs/common/ios/qmake.conf
@@ -2,8 +2,6 @@
# Common build settings for all iOS configurations
#
-QT_QPA_DEFAULT_PLATFORM = ios
-
QMAKE_XCODE_CODE_SIGN_IDENTITY = "iPhone Developer"
# iOS build tools
diff --git a/mkspecs/common/linux-android.conf b/mkspecs/common/linux-android.conf
index fec008cb45..b8e052d1ec 100644
--- a/mkspecs/common/linux-android.conf
+++ b/mkspecs/common/linux-android.conf
@@ -6,7 +6,6 @@ QMAKE_PLATFORM += android
include(linux.conf)
include(gcc-base-unix.conf)
-DEFINES += QT_NO_PRINTER QT_NO_PRINTDIALOG
QT_QPA_DEFAULT_PLATFORM = minimal
NDK_ROOT = $$(ANDROID_NDK_ROOT)
diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf
index 143df704b1..13916a5646 100644
--- a/mkspecs/common/linux.conf
+++ b/mkspecs/common/linux.conf
@@ -35,9 +35,7 @@ QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
QMAKE_LIBS_OPENVG = -lOpenVG
QMAKE_LIBS_THREAD = -lpthread
-QMAKE_LIBS_LIBUDEV = -ludev
-QMAKE_CFLAGS_WAYLAND =
QMAKE_INCDIR_WAYLAND =
QMAKE_LIBS_WAYLAND_CLIENT = -lwayland-client
QMAKE_LIBS_WAYLAND_SERVER = -lwayland-server
@@ -45,10 +43,6 @@ QMAKE_LIBDIR_WAYLAND =
QMAKE_DEFINES_WAYLAND =
QMAKE_WAYLAND_SCANNER = wayland-scanner
-QMAKE_CFLAGS_XCB =
-QMAKE_LIBS_XCB =
-QMAKE_DEFINES_XCB =
-
QMAKE_AR = ar cqs
QMAKE_OBJCOPY = objcopy
QMAKE_NM = nm -P
diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf
index 78b939cc9e..5208379f9a 100644
--- a/mkspecs/common/mac.conf
+++ b/mkspecs/common/mac.conf
@@ -6,9 +6,11 @@
QMAKE_PLATFORM += mac darwin
-include(unix.conf)
+MAKEFILE_GENERATOR = UNIX
+CONFIG += app_bundle incremental global_init_link_order lib_version_first sdk
+QMAKE_INCREMENTAL_STYLE = sublib
-CONFIG += sdk
+include(unix.conf)
QMAKE_RESOURCE = /Developer/Tools/Rez
QMAKE_EXTENSION_SHLIB = dylib
diff --git a/mkspecs/common/msvc-base.conf b/mkspecs/common/msvc-base.conf
index 37f38560e8..d54b11507e 100644
--- a/mkspecs/common/msvc-base.conf
+++ b/mkspecs/common/msvc-base.conf
@@ -27,8 +27,6 @@ greaterThan(MSC_VER, 1599) {
greaterThan(MSC_VER, 1699) {
# Visual Studio 2012 (11.0) / Visual C++ 17.0 and up
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -D_HAS_EXCEPTIONS=0
- QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE@QMAKE_SUBSYSTEM_SUFFIX@
- QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS@QMAKE_SUBSYSTEM_SUFFIX@
QT_CONFIG += c++11
CONFIG += c++11
}
diff --git a/mkspecs/common/qcc-base-qnx.conf b/mkspecs/common/qcc-base-qnx.conf
index 7101435cb5..624bdd3656 100644
--- a/mkspecs/common/qcc-base-qnx.conf
+++ b/mkspecs/common/qcc-base-qnx.conf
@@ -6,9 +6,6 @@ include(qcc-base.conf)
QMAKE_PLATFORM = qnx $$QMAKE_PLATFORM
-#Choose qnx QPA Plugin as default
-QT_QPA_DEFAULT_PLATFORM = qnx
-
QMAKE_LFLAGS_SHLIB += -shared
QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME += -Wl,-soname,
diff --git a/mkspecs/common/tvos.conf b/mkspecs/common/tvos.conf
new file mode 100644
index 0000000000..45e8c82c7b
--- /dev/null
+++ b/mkspecs/common/tvos.conf
@@ -0,0 +1,20 @@
+#
+# qmake common configuration for tvOS
+#
+
+QMAKE_PLATFORM += tvos
+QMAKE_MAC_SDK = appletvos
+
+simulator.sdk = appletvsimulator
+simulator.target = simulator
+simulator.dir_affix = $${simulator.sdk}
+simulator.CONFIG = $${simulator.sdk}
+simulator.deployment_identifier = tvos-simulator
+
+device.sdk = appletvos
+device.target = device
+device.dir_affix = $${device.sdk}
+device.CONFIG = $${device.sdk}
+device.deployment_identifier = $${device.sdk}
+
+include(uikit.conf)
diff --git a/mkspecs/common/uikit.conf b/mkspecs/common/uikit.conf
new file mode 100644
index 0000000000..bfbab36db6
--- /dev/null
+++ b/mkspecs/common/uikit.conf
@@ -0,0 +1,11 @@
+#
+# qmake configuration for shared by UIKIT platforms
+#
+
+QMAKE_PLATFORM += uikit
+CONFIG += bitcode reduce_exports
+
+INCLUDEPATH += $$PWD/uikit
+DEFINES += DARWIN_NO_CARBON
+
+include(mac.conf)
diff --git a/mkspecs/common/ios/GLES2/gl2.h b/mkspecs/common/uikit/GLES2/gl2.h
index 0974509a35..0974509a35 100644
--- a/mkspecs/common/ios/GLES2/gl2.h
+++ b/mkspecs/common/uikit/GLES2/gl2.h
diff --git a/mkspecs/common/watchos.conf b/mkspecs/common/watchos.conf
new file mode 100644
index 0000000000..a9352aa9c5
--- /dev/null
+++ b/mkspecs/common/watchos.conf
@@ -0,0 +1,20 @@
+#
+# qmake common configuration for watchOS
+#
+
+QMAKE_PLATFORM += watchos
+QMAKE_MAC_SDK = watchos
+
+simulator.sdk = watchsimulator
+simulator.target = simulator
+simulator.dir_affix = $${simulator.sdk}
+simulator.CONFIG = apple$${simulator.sdk}
+simulator.deployment_identifier = watchos-simulator
+
+device.sdk = watchos
+device.target = device
+device.dir_affix = $${device.sdk}
+device.CONFIG = apple$${device.sdk}
+device.deployment_identifier = $${device.sdk}
+
+include(uikit.conf)
diff --git a/mkspecs/common/wince/qmake.conf b/mkspecs/common/wince/qmake.conf
deleted file mode 100644
index fa1a72a1b9..0000000000
--- a/mkspecs/common/wince/qmake.conf
+++ /dev/null
@@ -1,84 +0,0 @@
-#
-# qmake configuration for common Windows CE
-#
-
-include(../angle.conf)
-
-MAKEFILE_GENERATOR = MSVC.NET
-QMAKE_PLATFORM += wince win32
-CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target
-
-DEFINES += UNDER_CE WINCE _WINDOWS _UNICODE UNICODE _WIN32 QT_NO_PRINTER QT_NO_PRINTDIALOG
-
-QMAKE_COMPILER_DEFINES += _MSC_VER=1400
-
-QMAKE_COMPILER = msvc
-
-QMAKE_CC = cl
-QMAKE_LEX = flex
-QMAKE_LEXFLAGS =
-QMAKE_YACC = bison -y
-QMAKE_YACCFLAGS = -d
-QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
-QMAKE_CFLAGS_WARN_ON = -W3
-QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD
-QMAKE_CFLAGS_LTCG = -GL
-QMAKE_CFLAGS_DEBUG = -DDEBUG -D_DEBUG -Zi -MDd
-QMAKE_CFLAGS_YACC =
-
-# Uncomment the following lines to reduce library sizes
-# with potential cost of performance
-# QMAKE_CFLAGS += -Os
-# QMAKE_CFLAGS_RELEASE += -Os
-
-QMAKE_CXX = $$QMAKE_CC
-QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189
-QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
-QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-QMAKE_CXXFLAGS_STL_ON = -EHsc
-QMAKE_CXXFLAGS_STL_OFF =
-QMAKE_CXXFLAGS_RTTI_ON = -GR
-QMAKE_CXXFLAGS_RTTI_OFF =
-QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
-QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -EHs-c-
-
-QMAKE_INCDIR =
-
-QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<<
-QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src
-QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
-QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
-
-QMAKE_LINK = link
-QMAKE_LFLAGS = /NOLOGO /NODEFAULTLIB:OLDNAMES.LIB
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
-QMAKE_LFLAGS_DEBUG = /DEBUG
-QMAKE_LFLAGS_LTCG = /LTCG
-QMAKE_LIBS_NETWORK = ws2.lib
-QMAKE_LIBS_OPENGL =
-QMAKE_LIBS_COMPAT =
-QMAKE_PREFIX_SHLIB =
-QMAKE_EXTENSION_SHLIB = dll
-QMAKE_PREFIX_STATICLIB =
-QMAKE_EXTENSION_STATICLIB = lib
-
-QMAKE_LIBS_EGL = $${LIBEGL_NAME}.lib
-QMAKE_LIBS_OPENGL_ES2 = $${LIBGLESV2_NAME}.lib
-
-QMAKE_LIBS_QT_ENTRY = -lqtmain
-
-QMAKE_IDL = midl
-QMAKE_LIB = lib
-QMAKE_RC = rc
-
-VCPROJ_EXTENSION = .vcproj
-VCSOLUTION_EXTENSION = .sln
-VCPROJ_KEYWORD = Qt4VSv1.0
-load(qt_config)
diff --git a/mkspecs/common/wince/qplatformdefs.h b/mkspecs/common/wince/qplatformdefs.h
deleted file mode 100644
index 92f5013231..0000000000
--- a/mkspecs/common/wince/qplatformdefs.h
+++ /dev/null
@@ -1,129 +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$
-**
-****************************************************************************/
-
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
-
-#ifdef UNICODE
-#ifndef _UNICODE
-#define _UNICODE
-#endif
-#endif
-
-// Get Qt defines/settings
-
-#include "qglobal.h"
-#include "qfunctions_wince.h"
-
-#define _POSIX_
-#include <limits.h>
-#undef _POSIX_
-
-#include <tchar.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct _stati64 // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
-#define QT_STAT ::_stati64
-#define QT_FSTAT ::_fstati64
-#else
-#define QT_STATBUF struct stat // non-ANSI defs
-#define QT_STATBUF4TSTAT struct stat // non-ANSI defs
-#define QT_STAT ::qt_wince_stat
-#define QT_FSTAT ::qt_wince__fstat
-#endif
-#define QT_STAT_REG _S_IFREG
-#define QT_STAT_DIR _S_IFDIR
-#define QT_STAT_MASK _S_IFMT
-#if defined(_S_IFLNK)
-# define QT_STAT_LNK _S_IFLNK
-#endif
-#define QT_FILENO ::qt_wince___fileno
-#define QT_OPEN ::qt_wince_open
-#define QT_CLOSE ::qt_wince__close
-#ifdef QT_LARGEFILE_SUPPORT
-#define QT_LSEEK ::_lseeki64
-#define QT_TSTAT ::_tstati64
-#else
-#define QT_LSEEK ::qt_wince__lseek
-#define QT_TSTAT ::_tstat
-#endif
-#define QT_READ ::qt_wince__read
-#define QT_WRITE ::qt_wince__write
-#define QT_ACCESS ::qt_wince__access
-#define QT_GETCWD ::_getcwd
-#define QT_CHDIR ::_chdir
-#define QT_MKDIR ::qt_wince__mkdir
-#define QT_RMDIR ::qt_wince__rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY _O_RDONLY
-#define QT_OPEN_WRONLY _O_WRONLY
-#define QT_OPEN_RDWR _O_RDWR
-#define QT_OPEN_CREAT _O_CREAT
-#define QT_OPEN_TRUNC _O_TRUNC
-#define QT_OPEN_APPEND _O_APPEND
-# define QT_OPEN_TEXT _O_TEXT
-# define QT_OPEN_BINARY _O_BINARY
-
-#define QT_FOPEN ::fopen
-#define QT_FSEEK ::fseek
-#define QT_FTELL ::ftell
-#define QT_FGETPOS ::fgetpos
-#define QT_FSETPOS ::fsetpos
-#define QT_MMAP ::mmap
-#define QT_FPOS_T fpos_t
-#define QT_OFF_T long
-
-#define QT_SIGNAL_ARGS int
-
-#define QT_VSNPRINTF(buffer, count, format, arg) \
- _vsnprintf(buffer, count, format, arg)
-
-#define QT_SNPRINTF ::_snprintf
-
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
-
-typedef int mode_t;
-
-#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in b/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in
index 235fe96794..b989f41efe 100644
--- a/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in
+++ b/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in
@@ -1,5 +1,5 @@
<?xml version=\"1.0\" encoding=\"utf-8\"?>
-<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2014/manifest\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\">
+<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http://schemas.microsoft.com/appx/2013/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2014/manifest\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\">
<Identity
Name=\"$${WINRT_MANIFEST.identity}\"
ProcessorArchitecture=\"$${WINRT_MANIFEST.architecture}\"
diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf
index b5e0c7cc71..05c9bd39a5 100644
--- a/mkspecs/common/winrt_winphone/qmake.conf
+++ b/mkspecs/common/winrt_winphone/qmake.conf
@@ -10,8 +10,7 @@ MAKEFILE_GENERATOR = MSBUILD
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 \
- QT_NO_PRINTER QT_NO_PRINTDIALOG # TODO: Remove when printing is re-enabled
+DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT Q_BYTE_ORDER=Q_LITTLE_ENDIAN
DEPLOYMENT_PLUGIN += qwinrt
diff --git a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp
index 4dac018810..184a47b683 100644
--- a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp
+++ b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qeglfshooks_8726m.cpp
@@ -37,7 +37,7 @@
**
****************************************************************************/
-#include "qeglfshooks.h"
+#include "private/qeglfshooks_p.h"
#include <EGL/fbdev_window.h>
#include <stdio.h>
#include <sys/ioctl.h>
diff --git a/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf b/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf
index 71ff90c9f8..99b8f22f97 100644
--- a/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf
+++ b/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf
@@ -4,14 +4,14 @@
# A typical configure line looks like this:
# <path-to-qt-src>/configure -opensource -confirm-license -release -make libs -make examples -optimized-qmake
# -platform linux-g++-64 -device linux-arm-hisilicon-hix5hd2-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf-
-# -opengl es2 -no-qml-debug -no-directfb -no-kms -no-xcb -no-alsa -no-audio-backend -qt-zlib -qt-libjpeg -qt-libpng
+# -opengl es2 -no-qml-debug -no-directfb -no-kms -no-xcb -no-alsa -qt-zlib -qt-libjpeg -qt-libpng
# -no-icu -no-nis -sysroot <path-to-rootfs> -extprefix <path-to-targetinstall> -hostprefix <path-to-hostinstall>
# -prefix <path-to-prefix>
#
# such as
# ./configure -opensource -confirm-license -release -make libs -make examples -optimized-qmake
# -platform linux-g++-64 -device linux-arm-hisilicon-hix5hd2-g++ -device-option CROSS_COMPILE=arm-linux-gnueabihf-
-# -opengl es2 -no-qml-debug -no-directfb -no-kms -no-xcb -no-alsa -no-audio-backend -qt-zlib -qt-libjpeg -qt-libpng
+# -opengl es2 -no-qml-debug -no-directfb -no-kms -no-xcb -no-alsa -qt-zlib -qt-libjpeg -qt-libpng
# -no-icu -no-nis -sysroot /home/abc/project/sysbase
# -extprefix /home/abc/project/sysbase/qt_install
# -hostprefix /home/abc/project/qtdir/qtbase_hostinstall
diff --git a/mkspecs/devices/linux-colibri-vf-g++/qmake.conf b/mkspecs/devices/linux-colibri-vf-g++/qmake.conf
new file mode 100644
index 0000000000..bc42f67f8a
--- /dev/null
+++ b/mkspecs/devices/linux-colibri-vf-g++/qmake.conf
@@ -0,0 +1,17 @@
+#
+# qmake configuration for the NXP Colibri VFxx boards
+#
+
+include(../common/linux_device_pre.conf)
+
+VFXX_CFLAGS = -march=armv7-a -mtune=cortex-a5 -mfpu=neon
+QMAKE_CFLAGS += $$VFXX_CFLAGS
+QMAKE_CXXFLAGS += $$VFXX_CFLAGS
+
+QT_QPA_DEFAULT_PLATFORM = linuxfb
+
+DISTRO_OPTS += hard-float
+
+include(../common/linux_arm_device_post.conf)
+
+load(qt_config)
diff --git a/mkspecs/wince70embedded-x86-msvc2008/qplatformdefs.h b/mkspecs/devices/linux-colibri-vf-g++/qplatformdefs.h
index 780b7ef124..6a35ed45d5 100644
--- a/mkspecs/wince70embedded-x86-msvc2008/qplatformdefs.h
+++ b/mkspecs/devices/linux-colibri-vf-g++/qplatformdefs.h
@@ -37,5 +37,4 @@
**
****************************************************************************/
-#include "../common/wince/qplatformdefs.h"
-
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/mkspecs/devices/linux-rpi3-g++/qmake.conf b/mkspecs/devices/linux-rpi3-g++/qmake.conf
index a660577565..10862ccd70 100644
--- a/mkspecs/devices/linux-rpi3-g++/qmake.conf
+++ b/mkspecs/devices/linux-rpi3-g++/qmake.conf
@@ -1,7 +1,12 @@
-# qmake configuration for the Raspberry Pi 3 (32-bit) using the Broadcom graphics stack
+# qmake configuration for the Raspberry Pi 3 using the Broadcom graphics stack
include(../common/linux_device_pre.conf)
+# For modern Yocto-based sysroots that have the proper include and lib
+# setup in egl.pc we will pull the necessary arguments from
+# there. However, to support Raspbian and older stuff that has /opt/vc
+# and possibly no pkg-config, have some static values as well:
+
# I consider it a bug that this is required, but our EGL config.test _requires_ it
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/opt/vc/lib
diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf
index ce5696a33c..848de485f8 100644
--- a/mkspecs/features/android/android_deployment_settings.prf
+++ b/mkspecs/features/android/android_deployment_settings.prf
@@ -65,6 +65,6 @@ contains(TEMPLATE, ".*app"):!build_pass: {
isEmpty(ANDROID_DEPLOYMENT_SETTINGS_FILE): ANDROID_DEPLOYMENT_SETTINGS_FILE = $$OUT_PWD/android-$$TARGET-deployment-settings.json
- write_file($$ANDROID_DEPLOYMENT_SETTINGS_FILE, FILE_CONTENT) | error("Aborting.")
+ write_file($$ANDROID_DEPLOYMENT_SETTINGS_FILE, FILE_CONTENT)|error()
}
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
index a890c7f6b9..f275e3ac06 100644
--- a/mkspecs/features/configure.prf
+++ b/mkspecs/features/configure.prf
@@ -1,40 +1,6 @@
-equals(QMAKE_HOST.os, Windows) {
- SETENV_PFX = "set "
- SETENV_SFX = "&"
-} else {
- SETENV_PFX =
- SETENV_SFX =
-}
-
-QMAKE_MAKE = $$(MAKE)
-!isEmpty(QMAKE_MAKE) {
- # We were called recursively. Use the same make.
-} else:if(equals(MAKEFILE_GENERATOR, UNIX)|equals(MAKEFILE_GENERATOR, MINGW)) {
- !equals(QMAKE_HOST.os, Windows): \
- QMAKE_MAKE = make
- else: \
- QMAKE_MAKE = mingw32-make
-} else:if(equals(MAKEFILE_GENERATOR, MSVC.NET)|equals(MAKEFILE_GENERATOR, MSBUILD)) {
- QMAKE_MAKE = nmake
-} else {
- error("Configure tests are not supported with the $$MAKEFILE_GENERATOR Makefile generator.")
-}
-# Make sure we don't inherit MAKEFLAGS - -i in particular is fatal.
-QMAKE_MAKE = "$${SETENV_PFX}MAKEFLAGS=$$SETENV_SFX $$QMAKE_MAKE"
-
-# Ensure that a cache is present. If none was found on startup, this will create
-# one in the build directory of the project which loads this feature.
-cache()
+load(configure_base)
-QMAKE_CONFIG_LOG = $$dirname(_QMAKE_CACHE_)/config.log
-QMAKE_CONFIG_TESTS_DIR = $$_PRO_FILE_PWD_/config.tests
-
-defineTest(qtRunLoggedCommand) {
- msg = "+ $$1"
- write_file($$QMAKE_CONFIG_LOG, msg, append)
- system("$$1 >> \"$$QMAKE_CONFIG_LOG\" 2>&1")|return(false)
- return(true)
-}
+isEmpty(QMAKE_CONFIG_TESTS_DIR): QMAKE_CONFIG_TESTS_DIR = $$_PRO_FILE_PWD_/config.tests
# Try to build the test project in $$QMAKE_CONFIG_TESTS_DIR/$$1
# ($$_PRO_FILE_PWD_/config.tests/$$1 by default).
@@ -73,7 +39,7 @@ defineTest(qtCompileTest) {
# Clean up after previous run
exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean")
- mkpath($$test_out_dir)|error("Aborting.")
+ mkpath($$test_out_dir)|error()
!isEmpty (QMAKE_QTCONF): qtconfarg = -qtconf $$QMAKE_QTCONF
diff --git a/mkspecs/features/configure_base.prf b/mkspecs/features/configure_base.prf
new file mode 100644
index 0000000000..dc630a3528
--- /dev/null
+++ b/mkspecs/features/configure_base.prf
@@ -0,0 +1,51 @@
+equals(QMAKE_HOST.os, Windows) {
+ SETENV_PFX = "set "
+ SETENV_SFX = "&"
+} else {
+ SETENV_PFX =
+ SETENV_SFX =
+}
+
+QMAKE_MAKE = $$(MAKE)
+!isEmpty(QMAKE_MAKE) {
+ # We were called recursively. Use the same make.
+} else: if(equals(MAKEFILE_GENERATOR, UNIX)|equals(MAKEFILE_GENERATOR, MINGW)) {
+ !equals(QMAKE_HOST.os, Windows): \
+ QMAKE_MAKE = make
+ else: \
+ QMAKE_MAKE = mingw32-make
+} else: if(equals(MAKEFILE_GENERATOR, MSVC.NET)|equals(MAKEFILE_GENERATOR, MSBUILD)) {
+ QMAKE_MAKE = nmake
+} else {
+ error("Configure tests are not supported with the $$MAKEFILE_GENERATOR Makefile generator.")
+}
+# Make sure we don't inherit MAKEFLAGS - -i in particular is fatal.
+QMAKE_MAKE = "$${SETENV_PFX}MAKEFLAGS=$$SETENV_SFX $$QMAKE_MAKE"
+
+isEmpty(QMAKE_CONFIG_VERBOSE): QMAKE_CONFIG_VERBOSE = false
+
+defineTest(qtLog) {
+ write_file($$QMAKE_CONFIG_LOG, 1, append)
+ $$QMAKE_CONFIG_VERBOSE: for (l, 1): log("$$l$$escape_expand(\\n)")
+}
+
+defineTest(qtRunLoggedCommand) {
+ qtLog("+ $$1")
+
+ output = $$system("( $$1 ) 2>&1", lines, result)
+ qtLog($$output)
+ !isEmpty(2) {
+ $$2 = $$output
+ export($$2)
+ }
+
+ !equals(result, 0): return(false)
+ return(true)
+}
+
+# Ensure that a cache is present. If none was found on startup, this will create
+# one in the build directory of the project which loads this feature.
+cache()
+
+QMAKE_CONFIG_LOG = $$dirname(_QMAKE_CACHE_)/config.log
+write_file($$QMAKE_CONFIG_LOG, "")
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 11fb52a0b1..1099e14b17 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -78,7 +78,7 @@ contains(CMAKE_PLUGIN_DIR, "^\\.\\./.*") {
CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True
}
-win32:!wince:!static:!staticlib {
+win32:!static:!staticlib {
CMAKE_DLL_DIR = $$cmakeRelativePath($$[QT_INSTALL_BINS], $$[QT_INSTALL_PREFIX])
contains(CMAKE_DLL_DIR, "^\\.\\./.*") {
CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/
@@ -208,7 +208,7 @@ mac {
CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.prl
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
} else {
- CONFIG(qt_framework, qt_framework|qt_no_framework) {
+ qt_framework {
CMAKE_LIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.framework/Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}
CMAKE_LIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.framework/Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}
CMAKE_BUILD_IS_FRAMEWORK = "true"
diff --git a/mkspecs/features/ctest_testcase_common.prf b/mkspecs/features/ctest_testcase_common.prf
index 7183ade4df..af80fc00a1 100644
--- a/mkspecs/features/ctest_testcase_common.prf
+++ b/mkspecs/features/ctest_testcase_common.prf
@@ -69,8 +69,9 @@ for (dep, dependentmodules): \
mod_deps += $$cmakeModuleName($$dep)
dependentmodules = $$join(mod_deps, ";")
-contains(QT_CONFIG, angle): CMAKE_GL_DEFINES = -DQT_WITH_ANGLE=True
-!contains(QT_CONFIG, egl): CMAKE_GL_DEFINES += -DNO_EGL=True
+QT_FOR_CONFIG += gui-private
+qtConfig(angle): CMAKE_GL_DEFINES = -DQT_WITH_ANGLE=True
+!qtConfig(egl): CMAKE_GL_DEFINES += -DNO_EGL=True
CMAKE_MODULE_VERSIONS =
CMAKE_MODULES_UNDER_TEST =
diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf
index cd4ea58d87..2d52525190 100644
--- a/mkspecs/features/default_pre.prf
+++ b/mkspecs/features/default_pre.prf
@@ -8,8 +8,6 @@ CONFIG = \
testcase_targets import_plugins import_qpa_plugin \
$$CONFIG
-contains(QT_CONFIG, c++11):lessThan(QT_COMPILER_STDCXX, 201103): CONFIG += c++11
-
!build_pass:defined(QT_EDITION, var):!equals(QT_EDITION, "OpenSource"):!equals(QT_EDITION, "Preview") {
#
# call license checker (but cache result for one day)
diff --git a/mkspecs/features/java.prf b/mkspecs/features/java.prf
index 0f0b991f0a..852954e5ca 100644
--- a/mkspecs/features/java.prf
+++ b/mkspecs/features/java.prf
@@ -28,7 +28,7 @@ javac.commands = javac -source 6 -target 6 -Xlint:unchecked -bootclasspath $$AND
javac.depends = FORCE
QMAKE_EXTRA_COMPILERS += javac
-mkpath($$absolute_path($$CLASS_DIR, $$OUT_PWD)) | error("Aborting.")
+mkpath($$absolute_path($$CLASS_DIR, $$OUT_PWD))|error()
# Disable all linker flags since we are overriding the regular linker
QMAKE_LFLAGS =
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index 6e920cd7d3..99c92d15f0 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -2,11 +2,11 @@ load(default_post)
!no_objective_c:CONFIG += objective_c
qt {
- contains(QT_CONFIG, static) {
+ qtConfig(static) {
# C++11 support means using libc++ instead of libstd++. As the
# two libraries are incompatible we need to ensure the end user
# project is built using the same C++11 support/no support as Qt.
- contains(QT_CONFIG, c++11) {
+ qtConfig(c++11) {
CONFIG += c++11
} else: c++11 {
warning("Qt was not built with C++11 enabled, disabling feature")
diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
index db1022294a..e21e749ee9 100644
--- a/mkspecs/features/mac/default_pre.prf
+++ b/mkspecs/features/mac/default_pre.prf
@@ -42,7 +42,7 @@ QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon
# and put it into a dSYM file. We don't need that dSYM file in
# the first place, since the information is available in the
# object files inside the archives (static libraries).
-contains(QT_CONFIG, static): \
+macx-xcode:qtConfig(static): \
QMAKE_XCODE_DEBUG_INFORMATION_FORMAT = dwarf
# This variable is used by the xcode_dynamic_library_suffix
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
index 5e5c52dc93..c7f5850aa0 100644
--- a/mkspecs/features/mac/sdk.prf
+++ b/mkspecs/features/mac/sdk.prf
@@ -24,12 +24,6 @@ QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path)
QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath)
QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion)
-!equals(MAKEFILE_GENERATOR, XCODE) {
- QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH
- QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH
- QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH
-}
-
sysrootified =
for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val
QMAKE_INCDIR_OPENGL = $$sysrootified
@@ -55,19 +49,76 @@ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_
}
!equals(MAKEFILE_GENERATOR, XCODE) {
- ios:!host_build {
- simulator: \
- version_identifier = $$simulator.deployment_identifier
- else: \
- version_identifier = $$device.deployment_identifier
- deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET
+ uikit:!host_build {
+ 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")
+
+ QMAKE_XARCH_CFLAGS =
+ QMAKE_XARCH_LFLAGS =
+ QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS
+
+ single_arch {
+ device_archs = $$first(device_archs)
+ simulator_archs = $$first(simulator_archs)
+ archs = $$first(archs)
+ }
+
+ 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_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}
} else: osx {
version_identifier = macosx
deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET
+ 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
}
- version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
- QMAKE_CFLAGS += $$version_min_flag
- QMAKE_CXXFLAGS += $$version_min_flag
- QMAKE_LFLAGS += $$version_min_flag
+ QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
+ QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
+ QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS)
}
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index 9d3c3353cc..1756ca35bf 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -21,11 +21,27 @@ win32:count(MOC_INCLUDEPATH, 40, >) {
WIN_INCLUDETEMP_CONT =
for (inc, MOC_INCLUDEPATH): \
WIN_INCLUDETEMP_CONT += -I$$inc
- write_file($$absolute_path($$WIN_INCLUDETEMP, $$OUT_PWD), WIN_INCLUDETEMP_CONT)|error("Aborting.")
+ write_file($$absolute_path($$WIN_INCLUDETEMP, $$OUT_PWD), WIN_INCLUDETEMP_CONT)|error()
+}
+
+# QNX's compiler sets "gcc" config, but does not support the -dM option;
+# UIKit builds are always multi-arch due to simulator_and_device (unless
+# -sdk is used) so this feature cannot possibly work.
+if(gcc|intel_icl|msvc):!rim_qcc:!uikit {
+ moc_predefs.CONFIG = no_link
+ gcc: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -dM -E -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+ else:intel_icl: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -QdM -P -Fi${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+ else:msvc {
+ moc_predefs.commands += $$QMAKE_CXX -Bx$$shell_quote($$shell_path($$[QT_INSTALL_BINS/get]/qmake)) $$QMAKE_CXXFLAGS -E ${QMAKE_FILE_IN} 2>NUL >${QMAKE_FILE_OUT}
+ } else: error("Oops, I messed up")
+ moc_predefs.output = $$MOC_DIR/moc_predefs.h
+ moc_predefs.input = MOC_PREDEF_FILE
+ silent: moc_predefs.commands = @echo generating $$moc_predefs.output$$escape_expand(\n\t)@$$moc_predefs.commands
+ QMAKE_EXTRA_COMPILERS += moc_predefs
+ MOC_PREDEF_FILE = $$[QT_HOST_DATA/src]/mkspecs/features/data/dummy.cpp
}
defineReplace(mocCmdBase) {
- RET =
!isEmpty(WIN_INCLUDETEMP) {
incvar = @$$WIN_INCLUDETEMP
} else {
@@ -34,7 +50,14 @@ defineReplace(mocCmdBase) {
incvar += -I$$shell_quote($$inc)
incvar += $$QMAKE_FRAMEWORKPATH_FLAGS
}
- RET += $$QMAKE_MOC $(DEFINES) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$incvar $$QMAKE_MOC_OPTIONS
+
+ RET = $$QMAKE_MOC $(DEFINES)
+ msvc: RET += --compiler-flavor=msvc
+
+ isEmpty(MOC_PREDEF_FILE): RET += $$join(QMAKE_COMPILER_DEFINES, " -D", -D)
+ else: RET += --include $$moc_predefs.output
+
+ RET += $$incvar $$QMAKE_MOC_OPTIONS
return($$RET)
}
@@ -46,7 +69,7 @@ moc_header.output = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAK
moc_header.input = HEADERS
moc_header.variable_out = SOURCES
moc_header.name = MOC ${QMAKE_FILE_IN}
-moc_header.depends += $$WIN_INCLUDETEMP
+moc_header.depends += $$WIN_INCLUDETEMP $$moc_predefs.output
silent:moc_header.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_header.commands
QMAKE_EXTRA_COMPILERS += moc_header
INCREDIBUILD_XGE += moc_header
@@ -58,7 +81,7 @@ moc_source.commands = ${QMAKE_FUNC_mocCmdBase} ${QMAKE_FILE_IN} -o ${QMAKE_FILE_
moc_source.output = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}
moc_source.input = SOURCES
moc_source.name = MOC ${QMAKE_FILE_IN}
-moc_source.depends += $$WIN_INCLUDETEMP
+moc_source.depends += $$WIN_INCLUDETEMP $$moc_predefs.output
silent:moc_source.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_source.commands
QMAKE_EXTRA_COMPILERS += moc_source
INCREDIBUILD_XGE += moc_source
diff --git a/mkspecs/features/no_debug_info.prf b/mkspecs/features/no_debug_info.prf
index 1307679a39..da14b7bb27 100644
--- a/mkspecs/features/no_debug_info.prf
+++ b/mkspecs/features/no_debug_info.prf
@@ -1,5 +1,4 @@
-
-win32-msvc2*|wince*msvc* {
+msvc {
QMAKE_CFLAGS -= -Zi
QMAKE_CFLAGS_DEBUG -= -Zi
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -Zi
diff --git a/mkspecs/features/qfeatures.prf b/mkspecs/features/qfeatures.prf
deleted file mode 100644
index 15ef5c5be0..0000000000
--- a/mkspecs/features/qfeatures.prf
+++ /dev/null
@@ -1,4 +0,0 @@
-# This file needs to be loaded explicitly, as the evaluation is relatively
-# expensive, and not many projects will actually need it.
-QMAKE_QT_FEATURES = $$[QT_HOST_DATA/get]/mkspecs/qfeatures.pri
-include($$QMAKE_QT_FEATURES) | error("Failed to load $$QMAKE_QT_FEATURES")
diff --git a/mkspecs/features/qmake_use.prf b/mkspecs/features/qmake_use.prf
new file mode 100644
index 0000000000..81b841d457
--- /dev/null
+++ b/mkspecs/features/qmake_use.prf
@@ -0,0 +1,28 @@
+suffix =
+for(ever) {
+ QMAKE_USE$${suffix} = $$unique(QMAKE_USE$${suffix})
+ for (use, QMAKE_USE$${suffix}) {
+ use = $$split(use, /)
+ name = $$take_first(use)
+ nu = $$upper($$name)
+ debug: \
+ libs = $$eval(QMAKE_LIBS_$${nu}_DEBUG)
+ else: \
+ libs = $$eval(QMAKE_LIBS_$${nu}_RELEASE)
+ libs += $$eval(QMAKE_LIBS_$$nu)
+ defines = $$eval(QMAKE_DEFINES_$${nu})
+ includes = $$eval(QMAKE_INCDIR_$${nu})
+
+ isEmpty(libs):isEmpty(defines):isEmpty(includes): \
+ error("Library '$$name' is not defined.")
+
+ !contains(use, nolink): \
+ LIBS$${suffix} += $$libs
+ !contains(use, linkonly) {
+ DEFINES += $$defines
+ INCLUDEPATH += $$includes
+ }
+ }
+ !isEmpty(suffix): break()
+ suffix = "_PRIVATE"
+}
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
index a367dc3337..7e12626db3 100644
--- a/mkspecs/features/qml_plugin.prf
+++ b/mkspecs/features/qml_plugin.prf
@@ -15,9 +15,8 @@ TEMPLATE = lib
CONFIG += plugin
if(win32|mac):!macx-xcode {
- contains(QT_CONFIG, simulator_and_device): CONFIG += simulator_and_device
- contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release
- contains(QT_CONFIG, build_all): CONFIG += build_all
+ qtConfig(debug_and_release): CONFIG += debug_and_release
+ qtConfig(build_all): CONFIG += build_all
}
CONFIG += relative_qt_rpath # Qt's QML plugins should be relocatable
diff --git a/mkspecs/features/qpa/basicunixfontdatabase.prf b/mkspecs/features/qpa/basicunixfontdatabase.prf
deleted file mode 100644
index f2e4016c99..0000000000
--- a/mkspecs/features/qpa/basicunixfontdatabase.prf
+++ /dev/null
@@ -1,3 +0,0 @@
-contains(QT_CONFIG, system-freetype) {
- LIBS_PRIVATE += -lfreetype
-}
diff --git a/mkspecs/features/qpa/genericunixfontdatabase.prf b/mkspecs/features/qpa/genericunixfontdatabase.prf
deleted file mode 100644
index 363d3dd247..0000000000
--- a/mkspecs/features/qpa/genericunixfontdatabase.prf
+++ /dev/null
@@ -1,6 +0,0 @@
-CONFIG += qpa/basicunixfontdatabase
-contains(QT_CONFIG, fontconfig) {
- DEFINES += Q_FONTCONFIGDATABASE
- LIBS_PRIVATE += -lfontconfig
-}
-
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index c0f17f9808..9bf0d2fad3 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -2,14 +2,14 @@ CONFIG *= thread
#handle defines
win32 {
- contains(QT_CONFIG, shared) {
+ qtConfig(shared) {
# this variable is read by qmake in qmake/generators/win32/msvc_vcproj.cpp
# function VcprojGenerator::initDeploymentTool()
QMAKE_DLL_PATHS += $$[QT_INSTALL_BINS/get]
}
}
CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG
-contains(QT_CONFIG, force_asserts):DEFINES += QT_FORCE_ASSERTS
+qtConfig(force_asserts): DEFINES += QT_FORCE_ASSERTS
no_keywords:DEFINES += QT_NO_KEYWORDS
plugin { #Qt plugins
static:DEFINES += QT_STATICPLUGIN
@@ -71,6 +71,7 @@ for(ever) {
MODULE_INCLUDES = $$eval(QT.$${QTLIB}.includes)
MODULE_LIBS = $$eval(QT.$${QTLIB}.libs)
MODULE_FRAMEWORKS = $$eval(QT.$${QTLIB}.frameworks)
+ MODULE_USES = $$eval(QT.$${QTLIB}.uses)
MODULE_CONFIG = $$eval(QT.$${QTLIB}.module_config)
isEmpty(MODULE_NAME) {
@@ -141,6 +142,7 @@ for(ever) {
}
}
}
+ QMAKE_USE$$var_sfx += $$MODULE_USES
# Add capabilities as defined by modules used in the project
winrt {
MODULE_WINRT_CAPABILITIES = $$eval(QT.$${QTLIB}.winrt_capabilities)
@@ -165,7 +167,7 @@ for(ever) {
qt_module_deps = $$CLEAN_QT $$CLEAN_QT_PRIVATE
qt_module_deps = $$resolve_depends(qt_module_deps, "QT.")
-!no_qt_rpath:!static:contains(QT_CONFIG, rpath):!contains(QT_CONFIG, static):\
+!no_qt_rpath:!static:qtConfig(rpath):!qtConfig(static):\
contains(qt_module_deps, core) {
relative_qt_rpath:!isEmpty(QMAKE_REL_RPATH_BASE):contains(INSTALLS, target):\
isEmpty(target.files):isEmpty(target.commands):isEmpty(target.extra) {
@@ -176,7 +178,7 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.")
}
}
-!isEmpty(QMAKE_LFLAGS_RPATHLINK):!contains(QT_CONFIG, static) {
+!isEmpty(QMAKE_LFLAGS_RPATHLINK):!qtConfig(static) {
# -rpath-link is used by the linker to find dependencies of dynamic
# libraries which were NOT specified on the command line.
# This means that paths of direct dependencies (QT & QT_PRIVATE)
@@ -191,7 +193,7 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.")
# static builds: link qml import plugins into the app.
contains(qt_module_deps, qml): \
- contains(QT_CONFIG, static):contains(TEMPLATE, .*app):!host_build:!no_import_scan {
+ qtConfig(static):contains(TEMPLATE, .*app):!host_build:!no_import_scan {
!isEmpty(QTREPOS) {
for (qrep, QTREPOS): \
exists($$qrep/qml): \
@@ -238,7 +240,7 @@ contains(qt_module_deps, qml): \
}
}
QML_IMPORT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_qml_plugin_import.cpp
- write_file($$QML_IMPORT_CPP, IMPORT_FILE_CONT)|error("Aborting.")
+ write_file($$QML_IMPORT_CPP, IMPORT_FILE_CONT)|error()
GENERATED_SOURCES += $$QML_IMPORT_CPP
QMAKE_DISTCLEAN += $$QML_IMPORT_CPP
@@ -261,7 +263,7 @@ contains(qt_module_deps, qml): \
"[Paths]" \
"Imports = $$QMAKE_QML_BUNDLE_PATH" \
"Qml2Imports = $$QMAKE_QML_BUNDLE_PATH"
- write_file("$$OUT_PWD/qt.conf", QT_CONF_CONTENTS)|error("Aborting.")
+ 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:
@@ -319,7 +321,7 @@ contains(TEMPLATE, .*app) {
}
QT_PLUGIN_VERIFY = DEPLOYMENT_PLUGIN
-contains(QT_CONFIG, static) {
+qtConfig(static) {
QT_PLUGIN_VERIFY += QTPLUGIN
force_import_plugins|contains(TEMPLATE, .*app) {
import_plugins:!isEmpty(QTPLUGIN) {
@@ -335,7 +337,7 @@ contains(QT_CONFIG, static) {
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("Aborting.")
+ write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error()
GENERATED_SOURCES += $$IMPORT_CPP
QMAKE_DISTCLEAN += $$IMPORT_CPP
}
@@ -366,7 +368,7 @@ for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_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:if(wince*|winrt) {
+ false:isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:winrt {
QT_ITEM =
debug: QT_ITEM = $${QTPLUG}d4.dll
else: QT_ITEM = $${QTPLUG}4.dll
diff --git a/mkspecs/features/qt_android_deps.prf b/mkspecs/features/qt_android_deps.prf
index 7ec7bad047..c172ca8c4e 100644
--- a/mkspecs/features/qt_android_deps.prf
+++ b/mkspecs/features/qt_android_deps.prf
@@ -79,7 +79,7 @@ DEPENDENCY_FILE = $$ANDROID_DEPENDS_DIR$$TARGET-android-dependencies.xml
!isEmpty(FILE_CONTENT) {
FILE_CONTENT = "<rules><dependencies><lib name=\"$$TARGET\"><depends>" $$FILE_CONTENT "</depends></lib></dependencies></rules>"
- write_file($$DEPENDENCY_FILE, FILE_CONTENT) | error("Aborting.")
+ write_file($$DEPENDENCY_FILE, FILE_CONTENT)|error()
}
}
diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf
index 46aca50cc2..87e32d6d42 100644
--- a/mkspecs/features/qt_app.prf
+++ b/mkspecs/features/qt_app.prf
@@ -21,14 +21,14 @@ QMAKE_LFLAGS += $$QMAKE_LFLAGS_GCSECTIONS
host_build: QT -= gui # no host tool will ever use gui
host_build:force_bootstrap {
- !build_pass:contains(QT_CONFIG, release_tools): CONFIG += release
+ !build_pass:qtConfig(release_tools): CONFIG += release
contains(QT, core(-private)?|xml) {
QT -= core core-private xml
QT += bootstrap-private
}
target.path = $$[QT_HOST_BINS]
} else {
- !build_pass:contains(QT_CONFIG, debug_and_release): CONFIG += release
+ !build_pass:qtConfig(debug_and_release): CONFIG += release
target.path = $$[QT_INSTALL_BINS]
CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable
}
@@ -36,3 +36,27 @@ INSTALLS += target
load(qt_targets)
load(qt_common)
+
+no_launch_target: return()
+
+load(resolve_target)
+launch.commands = $$shell_quote($$shell_path($$QMAKE_RESOLVED_TARGET))
+QMAKE_EXTRA_TARGETS += launch
+
+# Add environment for non-installed builds.
+QT_TOOL_NAME = target
+qtAddTargetEnv(launch.commands, QT)
+
+isEmpty(BUILDS)|build_pass {
+ launch.depends = first
+} else {
+ # For exclusive builds, run the app only once.
+ launch.CONFIG = recursive
+ launch.target = launch_all
+ launch.recurse_target = launch
+ launch.commands =
+
+ launch_first.depends = $$eval($$first(BUILDS).target)-launch
+ launch_first.target = launch
+ QMAKE_EXTRA_TARGETS += launch_first
+}
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf
index 1e2d5c2423..95e63ecae0 100644
--- a/mkspecs/features/qt_build_config.prf
+++ b/mkspecs/features/qt_build_config.prf
@@ -12,7 +12,7 @@
!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) {
QMAKE_QT_MODULE = $$[QT_HOST_DATA/get]/mkspecs/qmodule.pri
!exists($$QMAKE_QT_MODULE)|!include($$QMAKE_QT_MODULE, "", true) {
- error("Cannot load qmodule.pri!")
+ debug(1, "Cannot load qmodule.pri!")
} else {
debug(1, "Loaded qmodule.pri from ($$QMAKE_QT_MODULE)")
}
@@ -64,7 +64,7 @@ CONFIG = qt_build_extra $$CONFIG
cross_compile: \
CONFIG += force_bootstrap
-android|ios|winrt: \
+android|uikit|winrt: \
CONFIG += builtin_testdata
CONFIG += \
@@ -95,3 +95,26 @@ defineTest(qtNomakeTools) {
export($${d}.CONFIG)
}
}
+
+# This overloads the same function from qt_functions.prf.
+# This is not in qt_module.prf, as that gets loaded too late.
+defineTest(qtConfig) {
+ modules = $$QT $$QT_PRIVATE $$QT_FOR_PRIVATE $$QT_FOR_CONFIG
+ modules ~= s,-private$,_private,g
+ modules = $$resolve_depends(modules, "QT.", ".depends")
+ isEmpty(MODULE): \
+ MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0)
+ exists($$OUT_PWD/qt$${MODULE}-config.pri) {
+ include($$OUT_PWD/qt$${MODULE}-config.pri)
+ modules += $${MODULE} $${MODULE}_private
+ }
+ modules += global global_private
+ modules = $$reverse(modules)
+ for (module, modules) {
+ contains(QT.$${module}.enabled_features, $$1): \
+ return(true)
+ contains(QT.$${module}.disabled_features, $$1): \
+ return(false)
+ }
+ error("Could not find feature $${1}.")
+}
diff --git a/mkspecs/features/qt_build_extra.prf b/mkspecs/features/qt_build_extra.prf
index abdd7bc2b2..a1512c3a19 100644
--- a/mkspecs/features/qt_build_extra.prf
+++ b/mkspecs/features/qt_build_extra.prf
@@ -23,7 +23,8 @@ INCLUDEPATH += $$EXTRA_INCLUDEPATH
# The other flags are relevant only for actual libraries.
equals(TEMPLATE, aux): return()
-LIBS += $$EXTRA_LIBS
+QMAKE_LIBDIR += $$EXTRA_LIBDIR
+QMAKE_FRAMEWORKPATH += $$EXTRA_FRAMEWORKPATH
# Static libs need no rpaths
static: return()
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
index 59e08fc124..d30983f62b 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
@@ -12,15 +12,14 @@
QMAKE_DIR_REPLACE_SANE += DESTDIR
CONFIG -= debug_and_release_target
-contains(QT_CONFIG, c++11): CONFIG += c++11 strict_c++
-contains(QT_CONFIG, c++14): CONFIG += c++14
-contains(QT_CONFIG, c++1z): CONFIG += c++1z
+qtConfig(c++11): CONFIG += c++11 strict_c++
+qtConfig(c++14): CONFIG += c++14
+qtConfig(c++1z): CONFIG += c++1z
contains(TEMPLATE, .*lib) {
# module and plugins
- !host_build:contains(QT_CONFIG, reduce_exports): CONFIG += hide_symbols
- unix:contains(QT_CONFIG, reduce_relocations): CONFIG += bsymbolic_functions
- contains(QT_CONFIG, largefile): CONFIG += largefile
- contains(QT_CONFIG, separate_debug_info): CONFIG += separate_debug_info
+ !host_build:qtConfig(reduce_exports): CONFIG += hide_symbols
+ unix:qtConfig(reduce_relocations): CONFIG += bsymbolic_functions
+ qtConfig(separate_debug_info): CONFIG += separate_debug_info
!isEmpty(_QMAKE_SUPER_CACHE_): \
rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*
@@ -61,6 +60,8 @@ clang {
QMAKE_CXXFLAGS_WARN_ON += -Wvla
# GCC 5 introduced -Wdate-time
greaterThan(QT_GCC_MAJOR_VERSION, 4): QMAKE_CXXFLAGS_WARN_ON += -Wdate-time
+ # GCC 6 introduced these
+ greaterThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += -Wshift-overflow=2 -Wduplicated-cond
}
warnings_are_errors:warning_clean {
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
new file mode 100644
index 0000000000..6b500c0f3e
--- /dev/null
+++ b/mkspecs/features/qt_configure.prf
@@ -0,0 +1,1785 @@
+
+QT_CONFIGURE_REPORT =
+QT_CONFIGURE_NOTES =
+QT_CONFIGURE_WARNINGS =
+QT_CONFIGURE_ERRORS =
+
+defineTest(qtConfAddReport) {
+ QT_CONFIGURE_REPORT += "$$join(1, $$escape_expand(\\n))"
+ export(QT_CONFIGURE_REPORT)
+}
+
+defineTest(qtConfAddNote) {
+ QT_CONFIGURE_NOTES += "Note: $$join(1, $$escape_expand(\\n))"
+ export(QT_CONFIGURE_NOTES)
+}
+
+defineTest(qtConfAddWarning) {
+ QT_CONFIGURE_WARNINGS += "WARNING: $$join(1, $$escape_expand(\\n))"
+ export(QT_CONFIGURE_WARNINGS)
+}
+
+defineTest(qtConfAddError) {
+ QT_CONFIGURE_ERRORS += "ERROR: $$join(1, $$escape_expand(\\n))"
+ export(QT_CONFIGURE_ERRORS)
+ equals(2, log) {
+ CONFIG += mention_config_log
+ export(CONFIG)
+ }
+}
+
+defineTest(qtConfCommandlineSetInput) {
+ arg = $${1}
+ val = $${2}
+ !isEmpty($${currentConfig}.commandline.options.$${arg}.name): \
+ arg = $$eval($${currentConfig}.commandline.options.$${arg}.name)
+
+ config.input.$$arg = $$val
+ export(config.input.$$arg)
+}
+
+defineReplace(qtConfGetNextCommandlineArg) {
+ c = $$take_first(QMAKE_EXTRA_ARGS)
+ export(QMAKE_EXTRA_ARGS)
+ return($$c)
+}
+
+defineReplace(qtConfPeekNextCommandlineArg) {
+ return($$first(QMAKE_EXTRA_ARGS))
+}
+
+defineTest(qtConfCommandline_boolean) {
+ opt = $${1}
+ val = $${2}
+ isEmpty(val): val = yes
+
+ !equals(val, yes):!equals(val, no) {
+ qtConfAddError("Invalid value given for boolean command line option '$$opt'.")
+ return()
+ }
+
+ qtConfCommandlineSetInput($$opt, $$val)
+}
+
+defineTest(qtConfCommandline_void) {
+ opt = $${1}
+ val = $${2}
+ !isEmpty(val) {
+ qtConfAddError("Command line option '$$opt' expects no argument ('$$val' given).")
+ return()
+ }
+
+ val = $$eval($${currentConfig}.commandline.options.$${opt}.value)
+ isEmpty(val): val = yes
+
+ qtConfCommandlineSetInput($$opt, $$val)
+}
+
+defineTest(qtConfCommandline_enum) {
+ opt = $${1}
+ val = $${2}
+ isEmpty(val): val = yes
+
+ # validate and map value
+ mapped = $$eval($${currentConfig}.commandline.options.$${opt}.values.$${val})
+ isEmpty(mapped) {
+ # just a list of allowed values
+ for (i, $${currentConfig}.commandline.options.$${opt}.values._KEYS_) {
+ equals($${currentConfig}.commandline.options.$${opt}.values.$${i}, $$val) {
+ mapped = $$val
+ break()
+ }
+ }
+ }
+ isEmpty(mapped) {
+ qtConfAddError("Invalid value '$$val' supplied to command line option '$$opt'.")
+ return()
+ }
+
+ qtConfCommandlineSetInput($$opt, $$mapped)
+}
+
+defineTest(qtConfValidateValue) {
+ opt = $${1}
+ val = $${2}
+
+ validValues = $$eval($${currentConfig}.commandline.options.$${opt}.values._KEYS_)
+ isEmpty(validValues): \
+ return(true)
+
+ for (i, validValues) {
+ equals($${currentConfig}.commandline.options.$${opt}.values.$${i}, $$val): \
+ return(true)
+ }
+
+ qtConfAddError("Invalid value '$$val' supplied to command line option '$$opt'.")
+ return(false)
+}
+
+defineTest(qtConfCommandline_string) {
+ opt = $${1}
+ val = $${2}
+ isEmpty(val): val = $$qtConfGetNextCommandlineArg()
+
+ # Note: Arguments which are variable assignments are legit here.
+ contains(val, "^-.*")|isEmpty(val) {
+ qtConfAddError("No value supplied to command line option '$$opt'.")
+ return()
+ }
+
+ !qtConfValidateValue($$opt, $$val): \
+ return()
+
+ qtConfCommandlineSetInput($$opt, $$val)
+}
+
+defineTest(qtConfCommandline_optionalString) {
+ opt = $${1}
+ val = $${2}
+ isEmpty(val) {
+ v = $$qtConfPeekNextCommandlineArg()
+ contains(v, "^-.*|[A-Z_]+=.*")|isEmpty(v): \
+ val = "yes"
+ else: \
+ val = $$qtConfGetNextCommandlineArg()
+ }
+
+ !qtConfValidateValue($$opt, $$val): \
+ return()
+
+ qtConfCommandlineSetInput($$opt, $$val)
+}
+
+
+defineTest(qtConfCommandline_addString) {
+ opt = $${1}
+ val = $${2}
+ isEmpty(val): val = $$qtConfGetNextCommandlineArg()
+
+ contains(val, "^-.*|[A-Z_]+=.*")|isEmpty(val) {
+ qtConfAddError("No value supplied to command line option '$$opt'.")
+ return()
+ }
+
+ !qtConfValidateValue($$opt, $$val): \
+ return()
+
+ !isEmpty($${currentConfig}.commandline.options.$${opt}.name): \
+ opt = $$eval($${currentConfig}.commandline.options.$${opt}.name)
+
+ config.input.$$opt += $$val
+ export(config.input.$$opt)
+}
+
+defineTest(qtConfParseCommandLine) {
+ customCalls =
+ for (cc, allConfigs) {
+ custom = $$eval($${cc}.commandline.custom)
+
+ !isEmpty(custom) {
+ customCall = qtConfCommandline_$$custom
+ !defined($$customCall, test): \
+ error("Custom command line callback '$$custom' is undefined.")
+ customCalls += $$customCall
+ }
+ }
+
+ for (ever) {
+ c = $$qtConfGetNextCommandlineArg()
+ isEmpty(c): break()
+
+ # handle options to turn on verbose logging
+ contains(c, "^-v")|contains(c, "^--?verbose") {
+ QMAKE_CONFIG_VERBOSE = true
+ export(QMAKE_CONFIG_VERBOSE)
+ next()
+ }
+ contains(c, "^-no-v")|contains(c, "^--?no-verbose") {
+ QMAKE_CONFIG_VERBOSE = false
+ export(QMAKE_CONFIG_VERBOSE)
+ next()
+ }
+
+ contains(c, "^--?recheck") {
+ QMAKE_CONFIG_CACHE_USE = positive
+ export(QMAKE_CONFIG_CACHE_USE)
+ next()
+ }
+ contains(c, "^--?recheck-all") {
+ QMAKE_CONFIG_CACHE_USE = none
+ export(QMAKE_CONFIG_CACHE_USE)
+ next()
+ }
+
+ didCustomCall = false
+ for (customCall, customCalls) {
+ $${customCall}($$c) {
+ didCustomCall = true
+ break()
+ }
+ }
+ $$didCustomCall: \
+ next()
+
+ contains(c, "([A-Z_]+)=(.*)") {
+ opt = $$replace(c, "^([A-Z_]+)=(.*)", "\\1")
+ val = $$replace(c, "^([A-Z_]+)=(.*)", "\\2")
+ for (cc, allConfigs) {
+ var = $$eval($${cc}.commandline.assignments.$${opt})
+ !isEmpty(var): \
+ break()
+ }
+ isEmpty(var) {
+ qtConfAddError("Assigning unknown variable '$$opt' on command line.")
+ return()
+ }
+ config.input.$$var = $$val
+ export(config.input.$$var)
+ next()
+ }
+
+ # parse out opt and val
+ contains(c, "^--?enable-(.*)") {
+ opt = $$replace(c, "^--?enable-(.*)", "\\1")
+ val = yes
+ } else: contains(c, "^--?(disable|no)-(.*)") {
+ opt = $$replace(c, "^--?(disable|no)-(.*)", "\\2")
+ val = no
+ } else: contains(c, "^--([^=]+)=(.*)") {
+ opt = $$replace(c, "^--?([^=]+)=(.*)", "\\1")
+ val = $$replace(c, "^--?([^=]+)=(.*)", "\\2")
+ } else: contains(c, "^--(.*)") {
+ opt = $$replace(c, "^--(.*)", "\\1")
+ val = yes
+ } else: contains(c, "^-(.*)") {
+ opt = $$replace(c, "^-(.*)", "\\1")
+ val =
+ for (cc, allConfigs) {
+ type = $$eval($${cc}.commandline.options.$${opt})
+ !isEmpty(type): break()
+ type = $$eval($${cc}.commandline.options.$${opt}.type)
+ !isEmpty(type): break()
+ }
+ isEmpty(type):contains(opt, "(qt|system)-.*") {
+ val = $$replace(opt, "(qt|system)-(.*)", "\\1")
+ opt = $$replace(opt, "(qt|system)-(.*)", "\\2")
+ }
+ } else {
+ qtConfAddError("Invalid command line parameter '$$c'.")
+ return()
+ }
+
+ for (cc, allConfigs) {
+ type = $$eval($${cc}.commandline.options.$${opt})
+ isEmpty(type): \
+ type = $$eval($${cc}.commandline.options.$${opt}.type)
+ isEmpty(type) {
+ # no match in the regular options, try matching the prefixes
+ for (p, $${cc}.commandline.prefix._KEYS_) {
+ e = "^-$${p}(.*)"
+ contains(c, $$e) {
+ opt = $$eval($${cc}.commandline.prefix.$${p})
+ val = $$replace(c, $$e, "\\1")
+ type = "addString"
+ break()
+ }
+ }
+ }
+ !isEmpty(type) {
+ currentConfig = $$cc
+ break()
+ }
+ }
+ # handle builtin [-no]-feature-xxx
+ isEmpty(type):contains(opt, "feature-(.*)") {
+ opt ~= s,^feature-,,
+ found = false
+ for (cc, allConfigs) {
+ contains($${cc}.features._KEYS_, $$opt) {
+ found = true
+ break()
+ }
+ }
+ !$$found {
+ qtConfAddError("Enabling/Disabling unknown feature '$$opt'.")
+ return()
+ }
+ # this is a boolean enabling/disabling the corresponding feature
+ type = boolean
+ }
+
+ isEmpty(type) {
+ qtConfAddError("Unknown command line option '$$c'.")
+ return()
+ }
+
+ call = "qtConfCommandline_$${type}"
+ !defined($$call, test): \
+ error("Command line option '$$c' has unknown type '$$type'.")
+
+ # now that we have opt and value, process it
+ $${call}($$opt, $$val)
+ }
+}
+
+defineReplace(qtConfToolchainSupportsFlag) {
+ test_out_dir = $$shadowed($$QMAKE_CONFIG_TESTS_DIR)
+ test_cmd_base = "cd $$system_quote($$system_path($$test_out_dir)) &&"
+
+ conftest = "int main() { return 0; }"
+ write_file("$$test_out_dir/conftest.cpp", conftest)|error()
+
+ qtRunLoggedCommand("$$test_cmd_base $$QMAKE_CXX $${1} -o conftest-out conftest.cpp"): \
+ return(true)
+ return(false)
+}
+
+defineTest(qtConfTest_compilerSupportsFlag) {
+ flag = $$eval($${1}.flag)
+
+ return($$qtConfToolchainSupportsFlag($$flag))
+}
+
+defineTest(qtConfTest_linkerSupportsFlag) {
+ flag = $$eval($${1}.flag)
+
+ use_gold_linker: \
+ LFLAGS = -fuse-ld=gold
+
+ return($$qtConfToolchainSupportsFlag($$LFLAGS "-Wl,$$flag"))
+}
+
+defineReplace(qtConfFindInPathList) {
+ for (dir, 2) {
+ exists("$$dir/$${1}"): \
+ return("$$dir/$${1}")
+ }
+ return()
+}
+
+defineReplace(qtConfFindInPath) {
+ ensurePathEnv()
+ return($$qtConfFindInPathList($$1, $$2 $$QMAKE_PATH_ENV))
+}
+
+defineReplace(qtConfPkgConfigEnv) {
+ env =
+ !isEmpty(PKG_CONFIG_SYSROOT_DIR): env = "$${SETENV_PFX}PKG_CONFIG_SYSROOT_DIR=$${PKG_CONFIG_SYSROOT_DIR}$${SETENV_SFX} "
+ !isEmpty(PKG_CONFIG_LIBDIR): env = "$$env$${SETENV_PFX}PKG_CONFIG_LIBDIR=$${PKG_CONFIG_LIBDIR}$${SETENV_SFX} "
+ return($$env)
+}
+
+defineReplace(qtConfPkgConfig) {
+ host = $$1
+ isEmpty(host): host = false
+
+ $$host {
+ pkg_config = $$qtConfFindInPath("pkg-config")
+ } else {
+ pkg_config = "$$qtConfPkgConfigEnv()$$PKG_CONFIG_EXECUTABLE"
+ }
+
+ return($$pkg_config)
+}
+
+defineTest(qtConfPkgConfigPackageExists) {
+ isEmpty(1)|isEmpty(2): \
+ return(false)
+
+ !qtRunLoggedCommand("$${1} --exists --silence-errors $${2}"): \
+ return(false)
+
+ return(true)
+}
+
+defineReplace(qtConfPrepareArgs) {
+ arglist = $$split(1)
+ args =
+ for (a, arglist): \
+ args += $$system_quote($$a)
+ return($$args)
+}
+
+defineTest(qtConfSetupLibraries) {
+ for (l, $${currentConfig}.libraries._KEYS_) {
+ lpfx = $${currentConfig}.libraries.$${l}
+ # 'export' may be omitted, in which case it falls back to the library's name
+ !defined($${lpfx}.export, var) {
+ $${lpfx}.export = $$l
+ export($${lpfx}.export)
+ }
+ isEmpty($${lpfx}.sources._KEYS_): \
+ error("Library $$l defines no sources")
+ for (s, $${lpfx}.sources._KEYS_) {
+ spfx = $${lpfx}.sources.$${s}
+ # link back to parent object
+ $${spfx}.library = $$l
+ export($${spfx}.library)
+ # a plain string is transformed into a structure
+ isEmpty($${spfx}._KEYS_) {
+ $${spfx}.libs = $$eval($${spfx})
+ export($${spfx}.libs)
+ }
+ # if the type is missing (implicitly in the case of plain strings), assume 'inline'
+ isEmpty($${spfx}.type) {
+ $${spfx}.type = inline
+ export($${spfx}.type)
+ }
+ }
+ }
+
+ # reverse mapping for assignments on command line.
+ for (a, $${currentConfig}.commandline.assignments._KEYS_) {
+ apfx = $${currentConfig}.commandline.assignments.$${a}
+ ra = config.commandline.rev_assignments.$$eval($$apfx)
+ $$ra = $$a
+ export($$ra)
+ }
+}
+
+# the library is specified inline in a 'libs' field.
+# overrides from the command line are accepted.
+defineTest(qtConfLibrary_inline) {
+ lib = $$eval($${1}.library)
+ !defined($${1}.libs, var): \
+ error("'inline' source in library '$$lib' does not specify 'libs'.")
+
+ # direct libs. overwrites inline libs.
+ defined(config.input.$${lib}.libs, var) {
+ $${1}.libs = $$eval(config.input.$${lib}.libs)
+ export($${1}.libs)
+ }
+
+ # build-specific direct libs. overwrites inline libs.
+ vars =
+ any = false
+ all = true
+ for (b, $${1}.builds._KEYS_) {
+ iv = $${lib}.libs.$${b}
+ vars += $$eval(config.commandline.rev_assignments.$${iv})
+ defined(config.input.$${iv}, var) {
+ $${1}.builds.$${b}.libs = $$eval(config.input.$${iv})
+ export($${1}.builds.$${b}.libs)
+ any = true
+ } else {
+ all = false
+ }
+ }
+ $$any:!$$all {
+ qtConfAddError("Either none or all of $$join(vars, ", ", [, ]) must be specified.")
+ return(false)
+ }
+
+ # prefix. prepends to (possibly overwritten) inline libs.
+ prefix = $$val_escape(config.input.$${lib}.prefix)
+ !isEmpty(prefix) {
+ $${1}.includedir = $$prefix/include
+ export($${1}.includedir)
+ $${1}.libs = "-L$$prefix/lib $$eval($${1}.libs)"
+ export($${1}.libs)
+ }
+
+ return(true)
+}
+
+# the library is provided by the qmake spec.
+# this source type cannot fail.
+defineTest(qtConfLibrary_makeSpec) {
+ spec = $$eval($${1}.spec)
+ isEmpty(spec): \
+ error("makeSpec source in library '$$eval($${1}.library)' does not specify 'spec'.")
+
+ $${1}.includedir = "$$val_escape(QMAKE_INCDIR_$$spec)"
+ export($${1}.includedir)
+ libs =
+ for (l, QMAKE_LIBDIR_$$spec): \
+ libs += -L$$l
+ libs += $$eval(QMAKE_LIBS_$$spec)
+ $${1}.libs = "$$val_escape(libs)"
+ export($${1}.libs)
+
+ # the library definition is always in scope, so no point in exporting it.
+ $${1}.export = false
+ export($${1}.export)
+
+ return(true)
+}
+
+# the library is found via pkg-config.
+defineTest(qtConfLibrary_pkgConfig) {
+ pkg_config = $$qtConfPkgConfig($$eval($${1}.host))
+ isEmpty(pkg_config): \
+ return(false)
+ args = $$qtConfPrepareArgs($$eval($${1}.args))
+
+ !qtConfPkgConfigPackageExists($$pkg_config, $$args): \
+ return(false)
+
+ qtRunLoggedCommand("$$pkg_config --modversion $$args", version)|return(false)
+ qtRunLoggedCommand("$$pkg_config --libs-only-L --libs-only-l $$args", $${1}.libs)|return(false)
+ qtRunLoggedCommand("$$pkg_config --cflags $$args", $${1}.cflags)|return(false)
+ version ~= s/[^0-9.].*$//
+ $${1}.version = $$first(version)
+ export($${1}.version)
+ return(true)
+}
+
+defineTest(qtConfTest_getPkgConfigVariable) {
+ pkg_config = $$qtConfPkgConfig($$eval($${1}.host))
+ isEmpty(pkg_config): \
+ return(false)
+ args = $$qtConfPrepareArgs($$eval($${1}.pkg-config-args))
+
+ !qtConfPkgConfigPackageExists($$pkg_config, $$args): \
+ return(false)
+
+ variable = $$eval($${1}.pkg-config-variable)
+ qtRunLoggedCommand("$$pkg_config --variable=$$variable $$args", $${1}.value)|return(false)
+ export($${1}.value)
+ $${1}.cache += value
+ export($${1}.cache)
+ return(true)
+}
+
+defineReplace(qtConfLibraryArgs) {
+ qmake_args =
+ libs = $$eval($${1}.libs)
+ !isEmpty(libs): \
+ qmake_args += $$system_quote(LIBS += $$libs)
+ for (b, $${1}.builds._KEYS_): \
+ qmake_args += $$system_quote(LIBS_$$upper($$b) += $$eval($${1}.builds.$${b}))
+ includedir = $$eval($${1}.includedir)
+ !isEmpty(includedir): \
+ qmake_args += $$system_quote(INCLUDEPATH *= $$includedir)
+ cflags = $$eval($${1}.cflags)
+ !isEmpty(cflags): \
+ qmake_args += $$system_quote(QMAKE_CFLAGS += $$cflags) $$system_quote(QMAKE_CXXFLAGS += $$cflags)
+ return($$qmake_args)
+}
+
+defineTest(qtConfExportLibrary) {
+ isEmpty(2): return()
+ !$$qtConfEvaluate($$eval($${1}.export)): return()
+
+ output = privatePro
+
+ eval(libs = $$eval($${1}.libs))
+ eval(cflags = $$eval($${1}.cflags))
+ eval(includes = $$eval($${1}.includedir))
+
+ # Split $$cflags into stuff that goes into DEFINES, INCLUDEPATH, and other stuff.
+ defines =
+ ignored =
+ for (i, cflags) {
+ contains(i, "-I.*") {
+ i ~= s/^-I//
+ includes += $$i
+ } else: contains(i, "-D.*") {
+ i ~= s/^-D//
+ defines += $$i
+ } else {
+ # Sometimes, pkg-config files or *-config scripts include other flags
+ # we really don't need and shouldn't add (pg_config is really bad).
+ ignored += $$i
+ }
+ }
+ !isEmpty(ignored): \
+ qtConfAddNote("Dropped compiler flags '$$ignored' when detecting library '$$2'.")
+
+ NAME = $$upper($$2)
+ !isEmpty(libs): qtConfOutputVar(assign, $$output, QMAKE_LIBS_$$NAME, $$libs)
+ for (b, $${1}.builds._KEYS_): \
+ qtConfOutputVar(assign, $$output, QMAKE_LIBS_$${NAME}_$$upper($$b), \
+ $$eval($${1}.builds.$${b}))
+ !isEmpty(defines): qtConfOutputVar(assign, $$output, QMAKE_DEFINES_$$NAME, $$defines)
+ !isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes)
+ !isEmpty($${currentConfig}.module): \
+ qtConfExtendVar($$output, "QT.$${currentModule}_private.libraries", $$2)
+}
+
+defineTest(qtConfHandleLibrary) {
+ lpfx = $${currentConfig}.libraries.$$1
+ defined($${lpfx}.result, var): return()
+
+ qtConfEnsureTestTypeDeps("library")
+ qtConfTestPrepare_compile($$lpfx)
+ use_args = $$eval($${lpfx}.literal_args)
+
+ qtConfLoadResult($${lpfx}, $$1) {
+ $$eval($${lpfx}.result): \
+ qtConfExportLibrary($${lpfx}.sources.$$eval($${lpfx}.source), $$eval($${lpfx}.export))
+ return()
+ }
+
+ qtLogTestIntro($${lpfx})
+ msg = "looking for library $${1}"
+ write_file($$QMAKE_CONFIG_LOG, msg, append)
+
+ result = false
+ for (s, $${lpfx}.sources._KEYS_) {
+ spfx = $${lpfx}.sources.$${s}
+
+ t = $$eval($${spfx}.type)
+ call = qtConfLibrary_$$t
+ !defined($$call, test): \
+ error("Library $${1} source $${s} has unknown type '$$t'")
+
+ qtLog("Trying source $$s (type $$t) of library $${1} ...")
+
+ !$$qtConfEvaluate($$eval($${spfx}.condition)) {
+ qtLog(" => source failed condition.")
+ next()
+ }
+
+ !$${call}($$spfx) {
+ qtLog(" => source produced no result.")
+ next()
+ }
+
+ # if the library defines a test, use it to verify the source.
+ !isEmpty($${lpfx}.test) {
+ $${lpfx}.literal_args = $$use_args $$qtConfLibraryArgs($$spfx)
+ $${lpfx}.host = $$eval($${spfx}.host)
+ !qtConfTest_compile($$lpfx) {
+ qtLog(" => source failed verification.")
+ next()
+ }
+ }
+
+ qtLog(" => source accepted.")
+
+ $${lpfx}.cache += source
+ for (v, $$list(libs includes cflags version export)): \
+ $${lpfx}.cache += sources.$${s}.$${v}
+ for (b, $${spfx}.builds._KEYS_): \
+ $${lpfx}.cache += sources.$${s}.builds.$${b}
+
+ # immediately output the library as well.
+ qtConfExportLibrary($${spfx}, $$eval($${lpfx}.export))
+
+ $${lpfx}.source = $$s
+ export($${lpfx}.source)
+ result = true
+ break()
+ }
+
+ qtLogTestResult($${lpfx}, $$result)
+
+ $${lpfx}.result = $$result
+ export($${lpfx}.result)
+ qtConfSaveResult($${lpfx}, $$1)
+}
+
+# This is a fake test type for the test dependency system.
+defineTest(qtConfTest_library) {
+ error("The test type 'library' may not be instantiated.")
+}
+
+defineTest(qtConfTestPrepare_compile) {
+ for (u, $$list($$eval($${1}.use))) {
+ !contains($${currentConfig}.libraries._KEYS_, $$u): \
+ error("Test $$1 tries to use undeclared library '$$u'")
+ qtConfHandleLibrary($$u)
+ lpfx = $${currentConfig}.libraries.$${u}
+ isEmpty($${lpfx}.source): \
+ return(false)
+ $${1}.literal_args += $$qtConfLibraryArgs($${lpfx}.sources.$$eval($${lpfx}.source))
+ }
+ export($${1}.literal_args)
+ return(true)
+}
+
+defineTest(qtConfTest_compile) {
+ test = $$eval($${1}.test)
+ host = $$eval($${1}.host)
+ isEmpty(host): host = false
+
+ test_dir = $$QMAKE_CONFIG_TESTS_DIR/$$test
+ test_out_dir = $$shadowed($$test_dir)
+ !isEmpty($${1}.pro): \
+ test_dir = $$test_dir/$$eval($${1}.pro)
+ test_cmd_base = "cd $$system_quote($$system_path($$test_out_dir)) &&"
+
+ qmake_args = $$qtConfPkgConfigEnv()$$system_quote($$system_path($$QMAKE_QMAKE))
+ !isEmpty(QMAKE_QTCONF): \
+ qmake_args += -qtconf $$system_quote($$QMAKE_QTCONF)
+
+ # Disable qmake features which are typically counterproductive for tests
+ qmake_args += "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\""
+
+ # allow tests to behave differently depending on the type of library
+ # being built (shared/static). e.g. see config.tests/unix/icu
+ shared: \
+ qmake_configs = "shared"
+ else: \
+ qmake_configs = "static"
+
+ use_gold_linker: \
+ qmake_configs += "use_gold_linker"
+
+ # add console to the CONFIG variable when running the tests, so that they
+ # can work with a regular main() entry point on Windows.
+ qmake_configs += "console"
+
+ qmake_args += "\"CONFIG += $$qmake_configs\""
+
+ !$$host {
+ # On WinRT we need to change the entry point as we cannot create windows
+ # applications
+ winrt: \
+ qmake_args += " \"QMAKE_LFLAGS += /ENTRY:main\""
+
+ # add compiler flags, these are set for the target and should not be applied to host tests
+ !isEmpty(EXTRA_DEFINES): \
+ qmake_args += $$system_quote(DEFINES += $$val_escape(EXTRA_DEFINES))
+ !isEmpty(EXTRA_LIBDIR) \
+ qmake_args += $$system_quote(QMAKE_LIBDIR += $$val_escape(EXTRA_LIBDIR))
+ !isEmpty(EXTRA_FRAMEWORKPATH) \
+ qmake_args += $$system_quote(QMAKE_FRAMEWORKPATH += $$val_escape(EXTRA_FRAMEWORKPATH))
+ !isEmpty(EXTRA_INCLUDEPATH): \
+ qmake_args += $$system_quote(INCLUDEPATH += $$val_escape(EXTRA_INCLUDEPATH))
+ qmake_args += $$EXTRA_QMAKE_ARGS
+ }
+
+ # Clean up after previous run
+ exists($$test_out_dir/Makefile): \
+ QMAKE_MAKE = "$$QMAKE_MAKE clean && $$QMAKE_MAKE"
+
+ mkpath($$test_out_dir)|error()
+
+ # add possible command line args
+ qmake_args += $$qtConfPrepareArgs($$eval($${1}.args)) $$eval($${1}.literal_args)
+
+ qtRunLoggedCommand("$$test_cmd_base $$qmake_args $$system_quote($$test_dir)") {
+ qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE"): \
+ return(true)
+ }
+
+ return(false)
+}
+
+defineTest(qtConfTest_verifySpec) {
+ qtConfTest_compile($$1): return(true)
+ qtConfAddError("Cannot compile a minimal program. The toolchain or QMakeSpec is broken.", log)
+ qtConfPrintReport()
+ error()
+}
+
+defineTest(qtConfTest_files) {
+ for(i, $${1}.files._KEYS_) {
+ f = $$eval($${1}.files.$${i})
+ qtLog("Searching for file $${f}.")
+ contains(f, ".*\.h") {
+ file = $$qtConfFindInPathList($$f, $$EXTRA_INCLUDEPATH $$QMAKE_DEFAULT_INCDIRS)
+ } else: contains(f, ".*\.(lib|so|a)") {
+ file = $$qtConfFindInPathList($$f, $$EXTRA_LIBDIR $$QMAKE_DEFAULT_LIBDIRS)
+ } else {
+ # assume we're looking for an executable
+ file = $$qtConfFindInPath($$f, $$EXTRA_PATH)
+ }
+ isEmpty(file) {
+ qtLog(" Not found.");
+ return(false)
+ }
+ qtLog(" Found at $${file}.")
+ }
+ return(true)
+}
+
+defineTest(logn) {
+ log("$${1}$$escape_expand(\\n)")
+}
+
+defineTest(qtLogTestIntro) {
+ label = $$eval($${1}.label)
+ isEmpty(label): return()
+
+ msg = "Checking for $${label}... "
+ log($$msg)
+ $$QMAKE_CONFIG_VERBOSE: log("$$escape_expand(\\n)")
+ write_file($$QMAKE_CONFIG_LOG, msg, append)
+}
+
+defineTest(qtLogTestResult) {
+ isEmpty($${1}.label): return()
+
+ !isEmpty($${1}.log) {
+ field = $$eval($${1}.log)
+ log_msg = $$eval($${1}.$$field)
+ msg = "test $$1 gave result $$log_msg"
+ } else: $${2} {
+ log_msg = yes
+ msg = "test $$1 succeeded"
+ } else {
+ log_msg = no
+ msg = "test $$1 FAILED"
+ }
+ $$QMAKE_CONFIG_VERBOSE: log_msg = $$msg
+ logn("$$log_msg")
+ write_file($$QMAKE_CONFIG_LOG, msg, append)
+}
+
+defineTest(qtConfSaveResult) {
+ equals($${1}.cache, -): \
+ return()
+ keys = result $$eval($${1}.cache)
+ cont = "cache.$${2}._KEYS_ = $$keys"
+ for (k, keys): \
+ cont += "cache.$${2}.$${k} = $$val_escape($${1}.$${k})"
+ write_file($$QMAKE_CONFIG_CACHE, cont, append)|error()
+}
+
+defineTest(qtConfLoadResult) {
+ equals(QMAKE_CONFIG_CACHE_USE, none): \
+ return(false)
+ isEmpty(cache.$${2}._KEYS_): \
+ return(false)
+ equals(QMAKE_CONFIG_CACHE_USE, positive):!$$eval(cache.$${2}.result): \
+ return(false)
+ for (k, cache.$${2}._KEYS_) {
+ $${1}.$${k} = $$eval(cache.$${2}.$${k})
+ export($${1}.$${k})
+ }
+ return(true)
+}
+
+defineTest(qtConfIsBoolean) {
+ equals(1, "true")|equals(1, "false"): \
+ return(true)
+ return(false)
+}
+
+defineTest(qtConfSetupTestTypeDeps) {
+ for (tt, $${currentConfig}.testTypeDependencies._KEYS_) {
+ !defined(qtConfTest_$${tt}, test): \
+ error("Declaring dependency for undefined test type '$$tt'.")
+ for (f, $${currentConfig}.testTypeDependencies.$${tt}._KEYS_) {
+ feature = $$eval($${currentConfig}.testTypeDependencies.$${tt}.$${f})
+ isEmpty($${currentConfig}.features.$${feature}._KEYS_): \
+ error("Test type '$$tt' depends on undefined feature '$$feature'.")
+ }
+ }
+ # Test type aliasing means that one test type's callback is called by
+ # another test type's callback. Put differently, one callback forwards
+ # the call to another one. The former representation is more natural
+ # (and concise) to write, while the latter is more efficient to process.
+ # Hence, this function inverts the mapping.
+ for (tt, $${currentConfig}.testTypeAliases._KEYS_) {
+ !defined(qtConfTest_$${tt}, test): \
+ error("Aliasing undefined test type '$$tt'.")
+ for (tta, $${currentConfig}.testTypeAliases.$${tt}._KEYS_) {
+ type = $$eval($${currentConfig}.testTypeAliases.$${tt}.$${tta})
+ !defined(qtConfTest_$${type}, test): \
+ error("Aliasing '$$tt' to undefined test type '$$type'.")
+ $${currentConfig}.testTypeForwards.$${type} += $$tt
+ export($${currentConfig}.testTypeForwards.$${type})
+ }
+ }
+}
+
+defineTest(qtConfEnsureTestTypeDeps) {
+ depsn = $${currentConfig}.testTypeDependencies.$${1}._KEYS_
+ !isEmpty($$depsn) {
+ for (dep, $$depsn) {
+ feature = $$eval($${currentConfig}.testTypeDependencies.$${1}.$${dep})
+ !qtConfCheckFeature($$feature): \
+ error("Test type '$$1' depends on non-emitted feature $${feature}.")
+ }
+ $$depsn =
+ export($$depsn)
+ }
+ fwdsn = $${currentConfig}.testTypeForwards.$${1}
+ !isEmpty($$fwdsn) {
+ for (fwd, $$fwdsn): \
+ qtConfEnsureTestTypeDeps($$fwd)
+ $$fwdsn =
+ export($$fwdsn)
+ }
+}
+
+defineTest(qtRunSingleTest) {
+ tpfx = $${currentConfig}.tests.$${1}
+ defined($${tpfx}.result, var): \
+ return()
+
+ type = $$eval($${tpfx}.type)
+ call = "qtConfTest_$$type"
+ !defined($$call, test): \
+ error("Configure test $${1} refers to nonexistent type $$type")
+
+ qtConfEnsureTestTypeDeps($$type)
+
+ preCall = "qtConfTestPrepare_$$type"
+ defined($$preCall, test):!$${preCall}($${tpfx}) {
+ $${tpfx}.result = false
+ export($${tpfx}.result)
+ # don't cache the result; the pre-deps have their own caches.
+ return()
+ }
+
+ # note: we do this only after resolving the dependencies and the
+ # preparation (which may resolve libraries), so that caching does
+ # not alter the execution order (and thus the output).
+ qtConfLoadResult($${tpfx}, $$1): \
+ return()
+
+ qtLogTestIntro($${tpfx})
+ msg = "executing config test $${1}"
+ write_file($$QMAKE_CONFIG_LOG, msg, append)
+
+ result = false
+ $${call}($${tpfx}): result = true
+
+ qtLogTestResult($${tpfx}, $$result)
+
+ $${tpfx}.result = $$result
+ export($${tpfx}.result)
+ qtConfSaveResult($${tpfx}, $$1)
+}
+
+defineReplace(qtConfEvaluate) {
+ isEmpty(1): return(true)
+
+ 1 ~= s/$$escape_expand(\\t)/ /g
+ 1 ~= s/$$escape_expand(\\r)//g
+ 1 ~= s/$$escape_expand(\\n) */ /g
+ expr = $${1}
+ expr ~= s/&&/ && /g
+ expr ~= s/\|\|/ || /g
+ expr ~= s/!/ ! /g
+ expr ~= s/\\(/ ( /g
+ expr ~= s/\\)/ ) /g
+ expr ~= s/ *== */==/g
+ expr ~= s/ *! = */!=/g
+ expr_list = $$eval($$list($$expr))
+ return($$qtConfEvaluateSubExpression($${1}, $$expr_list, 0))
+}
+
+defineReplace(qtConfEvaluateSingleExpression) {
+ e = $${2}
+
+ equals(e, true) {
+ result = true
+ } else: equals(e, false) {
+ result = false
+ } else: contains(e, "^[0-9]+$") {
+ # numbers
+ result = $$e
+ } else: contains(e, "^'.*'$") {
+ # quoted literals
+ result = $$replace(e, "^'(.*)'$", "\\1")
+ } else: contains(e, "^tests\..*") {
+ !qt_conf_tests_allowed: \
+ error("Expression '$${1}' refers to a test, which is not allowed at this stage of configuring.")
+ test = $$section(e, ".", 1, 1)
+ var = $$section(e, ".", 2, -1)
+ isEmpty(var): \
+ var = result
+ !contains($${currentConfig}.tests._KEYS_, $$test): \
+ error("Unknown test object $${test} in expression '$${1}'.")
+ qtRunSingleTest($$test)
+ result = $$eval($${currentConfig}.tests.$${test}.$${var})
+ } else: contains(e, "^libs\..*") {
+ !qt_conf_tests_allowed: \
+ error("Expression '$${1}' refers to a library, which is not allowed at this stage of configuring.")
+ lib = $$section(e, ".", 1, 1)
+ var = $$section(e, ".", 2, -1)
+ isEmpty(var): \
+ var = result
+ !contains($${currentConfig}.libraries._KEYS_, $$lib): \
+ error("Unknown library object $${lib} in expression '$${1}'.")
+ qtConfHandleLibrary($$lib)
+ !defined($${currentConfig}.libraries.$${lib}.$${var}, var): \
+ var = sources.$$eval($${currentConfig}.libraries.$${lib}.source).$$var
+ result = $$eval($${currentConfig}.libraries.$${lib}.$${var})
+ } else: contains(e, "^features\..*") {
+ feature = $$section(e, ".", 1, 1)
+ var = $$section(e, ".", 2, -1)
+ isEmpty(var): \
+ var = available
+ !contains($${currentConfig}.features._KEYS_, $$feature) {
+ # this is basically a copy of what qtConfig() in qt_build_config.prf
+ # does, but we produce a nicer error message.
+ for (module, QMAKE_CONFIG_DEPS) {
+ contains(QT.$${module}.enabled_features, $$feature): \
+ result = true
+ else: contains(QT.$${module}.disabled_features, $$feature): \
+ result = false
+ else: \
+ next()
+ !equals(var, available): \
+ error("Expression '$$1' is accessing field '$$var' of non-local feature $${feature}.")
+ return($$result)
+ }
+ error("Unknown feature object $${feature} in expression '$${1}'.")
+ }
+ !qtConfCheckFeature($$feature): \
+ error("Expression '$$1' is accessing non-emitted feature $${feature}.")
+ result = $$eval($${currentConfig}.features.$${feature}.$${var})
+ } else: contains(e, "^config\..*") {
+ var = $$replace(e, "^config\.", "")
+ result = false
+ contains(CONFIG, $$var): result = true
+ } else: contains(e, "^arch\..*") {
+ var = $$replace(e, "^arch\.", "")
+ result = false
+ isEmpty(QT_ARCH): \
+ qtConfCheckFeature(architecture)
+ contains(QT_ARCH, $$var): result = true
+ } else: contains(e, "^input\..*") {
+ result = $$eval(config.$$e)
+ } else: contains(e, "^var\..*") {
+ var = $$replace(e, "^var\.", "")
+ result = $$eval($$var)
+ } else: contains(e, "^call\..*") {
+ call = $$replace(e, "^call\.", "qtConfFunc_")
+ !defined($$call, replace): \
+ error("Call $$call referenced in expression '$${1}' does not exist")
+ eval(result = \$\$"$$call"())
+ } else {
+ error("Unrecognized token $$e in expression '$${1}'")
+ }
+ return($$result)
+}
+
+defineReplace(qtConfEvaluateSubExpression) {
+ expr_list = $${2}
+ result = true
+ negate = false
+ runSubExpression = false
+ nesting_level = 0
+ for (n, $${3}..$$num_add($$size(expr_list), -1)) {
+ e = $$member(expr_list, $$n)
+ $$runSubExpression {
+ runSubExpression = false
+ result = $$qtConfEvaluateSubExpression($${1}, $$expr_list, $$n)
+ } else: isEqual(e, "(") {
+ isEqual(nesting_level, 0): runSubExpression = true
+ nesting_level = $$num_add($$nesting_level, 1)
+ next()
+ } else: isEqual(e, ")") {
+ nesting_level = $$num_add($$nesting_level, -1)
+ lessThan(nesting_level, 0): break()
+ next()
+ } else: greaterThan(nesting_level, 0) {
+ next()
+ } else: isEqual(e, "!") {
+ negate = true
+ next()
+ } else: isEqual(e, "&&") {
+ !qtConfIsBoolean($$result): \
+ error("Left hand side of && is non-boolean value '$$result' in expression '$${1}'")
+ !$$result: return(false)
+ } else: isEqual(e, "||") {
+ !qtConfIsBoolean($$result): \
+ error("Left hand side of || is non-boolean value '$$result' in expression '$${1}'")
+ $$result: return(true)
+ } else {
+ contains(e, ".*==.*") {
+ lhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, "==.*", ""))
+ rhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, ".*==", ""))
+ result = false
+ equals(lhs, $$rhs): result = true
+ } else: contains(e, ".*!=.*") {
+ lhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, "!=.*", ""))
+ rhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, ".*!=", ""))
+ result = false
+ !equals(lhs, $$rhs): result = true
+ } else {
+ result = $$qtConfEvaluateSingleExpression($${1}, $$e)
+ }
+ }
+ $$negate {
+ !qtConfIsBoolean($$result): \
+ error("Attempting to negate a non-boolean value '$$result' in expression '$${1}'")
+ $$result: \
+ result = false
+ else: \
+ result = true
+ negate = false
+ }
+ }
+ return($$result)
+}
+
+defineReplace(qtIsFeatureEnabled) {
+ enable = $$eval($${currentConfig}.features.$${1}.enable)
+ !isEmpty(enable) {
+ $$qtConfEvaluate($$enable): \
+ return(true)
+ } else {
+ equals(config.input.$${1}, "yes"): \
+ return(true)
+ }
+
+ return(false)
+}
+
+defineReplace(qtIsFeatureDisabled) {
+ disable = $$eval($${currentConfig}.features.$${1}.disable)
+ !isEmpty(disable) {
+ $$qtConfEvaluate($$disable): \
+ return(true)
+ } else {
+ equals(config.input.$${1}, "no"): \
+ return(true)
+ }
+
+ return(false)
+}
+
+defineReplace(qtConfCheckSingleCondition) {
+ result = $$qtConfEvaluate($$2)
+
+ !qtConfIsBoolean($$result): \
+ error("Evaluation of condition '$$2' yielded non-boolean value '$$result' in feature '$${1}'.")
+
+ !$$result {
+ $${3} {
+ qtConfAddError("Feature '$${1}' was enabled, but the pre-condition '$$2' failed.", log)
+ $$result = true
+ }
+ }
+ return($$result)
+}
+
+defineTest(qtConfCheckFeature) {
+ fpfx = $${currentConfig}.features.$${1}
+
+ available = $$eval($${fpfx}.available)
+ !isEmpty(available): return(true)
+
+ # skip features that will not get emitted anyway
+ emitIf = $$qtConfEvaluate($$eval($${fpfx}.emitIf))
+ enabled = $$qtIsFeatureEnabled($$1)
+ disabled = $$qtIsFeatureDisabled($$1)
+
+ !$$emitIf {
+ $$enabled|$$disabled: \
+ qtConfAddWarning("Feature $${1} is insignificant in this configuration, ignoring related command line option(s).")
+ return(false)
+ }
+
+ $$disabled {
+ result = false
+ } else: !$$enabled:!$$qtConfEvaluate($$eval($${fpfx}.autoDetect)) {
+ # feature not auto-detected and not explicitly enabled
+ result = false
+ } else {
+ condition = $$eval($${fpfx}.condition)
+ !isEmpty(condition) {
+ result = $$qtConfCheckSingleCondition($$1, $$condition, $$enabled)
+ } else {
+ result = true
+ # check whether we have an array of conditions
+ for (i, $${fpfx}.condition._KEYS_) {
+ condition = $$eval($${fpfx}.condition.$$i)
+ result = $$qtConfCheckSingleCondition($$1, $$condition, $$enabled)
+ !$$result: break()
+ }
+ }
+ }
+ $${fpfx}.available = $$result
+ export($${fpfx}.available)
+
+ for (i, $${currentConfig}.features.$${feature}.output._KEYS_): \
+ qtConfProcessOneOutput($$feature, $$i)
+
+ return(true)
+}
+
+
+defineTest(qtConfProcessFeatures) {
+ for (feature, $${currentConfig}.features._KEYS_): \
+ qtConfCheckFeature($$feature)
+}
+
+#
+# reporting
+#
+
+QT_CONF_REPORT_PADDING = "........................................"
+
+defineTest(qtConfReportPadded) {
+ pad = $$num_add($$str_size($$QT_CONF_REPORT_PADDING), -$$str_size($${1}))
+ lessThan(pad, 0): pad = 0
+ str = "$$1 $$str_member($$QT_CONF_REPORT_PADDING, 0, $$pad)"
+
+ qtConfAddReport("$$str $${2}")
+}
+
+defineReplace(qtConfCollectFeatures) {
+ l =
+ for (feature, $$list($${1})) {
+ $$eval($${currentConfig}.features.$${feature}.available): \
+ l += $$eval($${currentConfig}.features.$${feature}.label)
+ }
+
+ isEmpty(l): return("<none>")
+ return($$join(l, ' '))
+}
+
+defineTest(qtConfReport_featureList) {
+ qtConfReportPadded($${1}, $$qtConfCollectFeatures($${2}))
+}
+
+defineReplace(qtConfFindFirstAvailableFeature) {
+ for (feature, $$list($${1})) {
+ isEmpty($${currentConfig}.features.$${feature}._KEYS_): \
+ error("Asking for a report on undefined feature $${2}.")
+ $$eval($${currentConfig}.features.$${feature}.available): \
+ return($$eval($${currentConfig}.features.$${feature}.label))
+ }
+
+ return("<none>")
+}
+
+defineTest(qtConfReport_firstAvailableFeature) {
+ qtConfReportPadded($${1}, $$qtConfFindFirstAvailableFeature($${2}))
+}
+
+defineTest(qtConfReport_feature) {
+ !contains($${currentConfig}.features._KEYS_, $$2): \
+ error("Asking for a report on undefined feature $${2}.")
+
+ # hide report for not emitted features
+ isEmpty($${currentConfig}.features.$${2}.available): \
+ return()
+
+ $$eval($${currentConfig}.features.$${2}.available) {
+ result = "yes"
+ !isEmpty(3): result = "$${3}"
+ } else {
+ result = "no"
+ !isEmpty(4): result = "$${4}"
+ }
+
+ text = $$eval($${currentConfig}.features.$${2}.label)
+
+ qtConfReportPadded($${1}$$text, $$result)
+}
+
+defineTest(qtConfReport_note) {
+ qtConfAddNote($${1})
+}
+
+defineTest(qtConfReport_warning) {
+ qtConfAddWarning($${1})
+}
+
+defineTest(qtConfReport_error) {
+ qtConfAddError($${1}, log)
+}
+
+defineTest(qtConfCreateReportRecurse) {
+ equals(2, false) {
+ indent = ""
+ recurse = false
+ } else {
+ indent = $${2}
+ recurse = true
+ }
+
+ keys = $$eval($${1}._KEYS_)
+ for (n, keys) {
+ entry = $${1}.$$n
+ subKeys = $$eval($${entry}._KEYS_)
+ contains(subKeys, condition) {
+ condition = $$eval($${entry}.condition)
+ r = $$qtConfEvaluate($$condition)
+ !qtConfIsBoolean($$r): \
+ error("Evaluation of condition '$$condition' in report entry $${entry} yielded non-boolean value '$$r'.")
+ !$$r: next()
+ }
+ contains(subKeys, "section") {
+ !$$recurse: \
+ error("Report type 'section' is not allowed in '$$1'.")
+ section = $$eval($${entry}.section)
+ qtConfAddReport("$$indent$$section:")
+ qtConfCreateReportRecurse("$${entry}.entries", "$$indent ")
+ } else: !isEmpty($${entry}) {
+ feature = $$eval($${entry})
+ qtConfReport_feature($$indent, $$feature)
+ } else {
+ text = $$eval($${entry}.message)
+ isEmpty($${entry}.type): \
+ error("Report entry $${entry} doesn't define a type.")
+ r = "qtConfReport_$$eval($${entry}.type)"
+ !defined($$r, test): \
+ error("Undefined report type $$eval($${entry}.type) used in report entry $${entry}.")
+ args = $$eval($${entry}.args)
+ $${r}($$indent$${text}, $$args)
+ }
+ }
+}
+
+defineTest(qtConfProcessEarlyChecks) {
+ qtConfCreateReportRecurse($${currentConfig}.earlyReport, false)
+}
+
+defineTest(qtConfCreateReport) {
+ qtConfCreateReportRecurse($${currentConfig}.report, false)
+}
+
+defineTest(qtConfCreateSummary) {
+ qtConfCreateReportRecurse($${currentConfig}.summary, "")
+}
+
+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()
+ }
+
+ !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()
+ }
+}
+
+defineTest(qtConfCheckErrors) {
+ !isEmpty(QT_CONFIGURE_ERRORS):!equals(config.input.continue, yes): \
+ qtConfPrintReport()
+}
+
+#
+# output generation
+#
+
+# qtConfOutputVar(modifier, output, name, value)
+defineTest(qtConfOutputVar) {
+ modifier = $$1
+ output = $$2
+ name = $$3
+ value = $$val_escape(4)
+
+ defined($${currentConfig}.output.$${output}.assign.$${name}, var): \
+ error("Trying to overwrite assigned variable '$$name' in '$$output' using modifier '$$modifier'.")
+
+ equals(modifier, assign) {
+ !isEmpty($${currentConfig}.output.$${output}.append.$${name})|!isEmpty($${currentConfig}.output.$${output}.remove.$${name}): \
+ error("Trying to assign variable '$$name' in '$$output', which has already appended or removed parts.")
+ $${currentConfig}.output.$${output}.assign.$${name} = $$value
+ } else: equals(modifier, append) {
+ contains($${currentConfig}.output.$${output}.remove.$${name}, $$value): \
+ error("Trying to append removed '$$value' to variable '$$name' in '$$output'.")
+ $${currentConfig}.output.$${output}.append.$${name} += $$value
+ } else: equals(modifier, remove) {
+ contains($${currentConfig}.output.$${output}.append.$${name}, $$value): \
+ error("Trying to remove appended '$$value' to variable '$$name' in '$$output'.")
+ $${currentConfig}.output.$${output}.remove.$${name} += $$value
+ } else {
+ error("Invalid modifier '$$modifier' passed to qtConfOutputVar.")
+ }
+ $${currentConfig}.output.$${output}.$${modifier}._KEYS_ *= $${name}
+ export($${currentConfig}.output.$${output}.$${modifier}.$${name})
+ export($${currentConfig}.output.$${output}.$${modifier}._KEYS_)
+}
+
+# qtConfExtendVar(output, name, value)
+defineTest(qtConfExtendVar) {
+ output = $$1
+ name = $$2
+ value = $$val_escape(3)
+
+ !defined($${currentConfig}.output.$${output}.assign.$${name}, var): \
+ error("Trying to extend undefined variable '$$name' in '$$output'.")
+
+ $${currentConfig}.output.$${output}.assign.$${name} += $$value
+ export($${currentConfig}.output.$${output}.assign.$${name})
+}
+
+defineTest(qtConfOutputVarHelper) {
+ !isEmpty($${2}.public):$$eval($${2}.public) {
+ output = "publicPro"
+ } else {
+ output = "privatePro"
+ }
+
+ negative = $$eval($${2}.negative)
+ isEmpty(negative): negative = false
+ equals(3, $$negative): return()
+
+ name = $$eval($${2}.name)
+ isEmpty(name): \
+ error("Output type 'var$$title($$1)' used in feature '$$eval($${2}.feature)' without a 'name' entry.")
+
+ value = $$qtConfEvaluate($$eval($${2}.value))
+ !isEmpty($${2}.eval):$$qtConfEvaluate($$eval($${2}.eval)): \
+ eval(value = $$value)
+ qtConfOutputVar($$1, $$output, $$name, $$value)
+ equals(output, "publicPro"):!isEmpty($${currentConfig}.module): \
+ qtConfExtendVar($$output, "QT.$${currentModule}.exports", $$name)
+}
+
+defineTest(qtConfOutput_varAssign) {
+ qtConfOutputVarHelper(assign, $$1, $$2)
+}
+
+defineTest(qtConfOutput_varAppend) {
+ qtConfOutputVarHelper(append, $$1, $$2)
+}
+
+defineTest(qtConfOutput_varRemove) {
+ qtConfOutputVarHelper(remove, $$1, $$2)
+}
+
+defineTest(qtConfOutputConfigVar) {
+ pro = $$3
+ var = $$4
+ modular = $$5
+
+ negative = $$eval($${1}.negative)
+ isEmpty(negative): negative = false
+ equals(2, $$negative): return()
+
+ val = $$eval($${1}.name)
+ isEmpty(val) {
+ val = $$eval($${1}.feature)
+ $$negative: val = no-$$val
+ }
+
+ isEmpty($${currentConfig}.module)|!$$modular: \
+ qtConfOutputVar(append, $$pro, $$var, $$val)
+ else: \
+ qtConfExtendVar($$pro, "QT.$${currentModule}.$$var", $$val)
+}
+
+defineTest(qtConfOutput_publicQtConfig) {
+ qtConfOutputConfigVar($$1, $$2, "publicPro", "QT_CONFIG", true)
+}
+
+defineTest(qtConfOutput_publicConfig) {
+ !isEmpty($${currentConfig}.module): \
+ error("Cannot use output type 'publicConfig' in module-local feature '$$eval($${1}.feature)'.")
+ qtConfOutputConfigVar($$1, $$2, "publicPro", "CONFIG", false)
+}
+
+defineTest(qtConfOutput_privateConfig) {
+ qtConfOutputConfigVar($$1, $$2, "privatePro", "CONFIG", false)
+}
+
+defineTest(qtConfOutputSetDefine) {
+ $${currentConfig}.output.$${1}.$${2} = $${3}
+ $${currentConfig}.output.$${1}._KEYS_ *= $${2}
+ export($${currentConfig}.output.$${1}.$${2})
+ export($${currentConfig}.output.$${1}._KEYS_)
+}
+
+defineTest(qtConfOutput_define) {
+ output = publicHeader
+ define = $$eval($${1}.name)
+ value = $$qtConfEvaluate($$eval($${1}.value))
+ isEmpty(define): \
+ error("Output type 'define' used in feature '$$eval($${1}.feature)' without a 'name' entry.")
+
+ negative = $$eval($${1}.negative)
+ isEmpty(negative): negative = false
+ equals(2, $$negative): return()
+
+ qtConfOutputSetDefine($$output, $$define, $$value)
+}
+
+defineTest(qtConfOutput_feature) {
+ name = "$$eval($${1}.name)"
+ isEmpty(name): \
+ name = $$eval($${1}.feature)
+
+ $${2} {
+ isEmpty($${currentConfig}.module): \
+ qtConfOutputVar(append, "publicPro", "QT_CONFIG", $$name)
+ else: \
+ qtConfExtendVar("publicPro", "QT.$${currentModule}.QT_CONFIG", $$name)
+ } else {
+ f = $$upper($$replace(name, -, _))
+ qtConfOutputSetDefine("publicHeader", "QT_NO_$$f")
+ }
+}
+
+defineTest(qtConfSetModuleName) {
+ currentModule = $$eval($${currentConfig}.module)
+ isEmpty(currentModule): \
+ currentModule = global
+ export(currentModule)
+}
+
+defineTest(qtConfSetupModuleOutputs) {
+ qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.enabled_features", )
+ qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.disabled_features", )
+ qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}_private.enabled_features", )
+ qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}_private.disabled_features", )
+ !isEmpty($${currentConfig}.module) {
+ qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.QT_CONFIG", )
+ qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.exports", )
+ qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}_private.libraries", )
+ }
+}
+
+defineTest(qtConfOutput_publicFeature) {
+ name = "$$eval($${1}.name)"
+ isEmpty(name): \
+ name = $$eval($${1}.feature)
+ feature = $$replace(name, [-+.], _)
+
+ $${2} {
+ qtConfExtendVar("publicPro", "QT.$${currentModule}.enabled_features", $$name)
+ QT.$${currentModule}.enabled_features += $$name
+ export(QT.$${currentModule}.enabled_features)
+ qtConfOutputSetDefine("publicHeader", "QT_FEATURE_$$feature", 1)
+ } else {
+ qtConfExtendVar("publicPro", "QT.$${currentModule}.disabled_features", $$name)
+ QT.$${currentModule}.disabled_features += $$name
+ export(QT.$${currentModule}.disabled_features)
+ qtConfOutputSetDefine("publicHeader", "QT_FEATURE_$$feature", -1)
+ }
+}
+
+# currently this is somewhat inconsistent, as the feature is output to the public pro file,
+# whereas the define is being added to the private pro file.
+# This should get cleaned up to add to the private pro and header instead.
+defineTest(qtConfOutput_privateFeature) {
+ name = "$$eval($${1}.name)"
+ isEmpty(name): \
+ name = $$eval($${1}.feature)
+ feature = $$replace(name, [-+.], _)
+
+ $${2} {
+ qtConfExtendVar("privatePro", "QT.$${currentModule}_private.enabled_features", $$name)
+ QT.$${currentModule}_private.enabled_features += $$name
+ export(QT.$${currentModule}_private.enabled_features)
+ qtConfOutputSetDefine("privateHeader", "QT_FEATURE_$$feature", 1)
+ } else {
+ qtConfExtendVar("privatePro", "QT.$${currentModule}_private.disabled_features", $$name)
+ QT.$${currentModule}_private.disabled_features += $$name
+ export(QT.$${currentModule}_private.disabled_features)
+ qtConfOutputSetDefine("privateHeader", "QT_FEATURE_$$feature", -1)
+ }
+}
+
+defineTest(qtConfProcessOneOutput) {
+ feature = $${1}
+ fpfx = $${currentConfig}.features.$${feature}
+ opfx = $${fpfx}.output.$${2}
+
+ condition = $$eval($${opfx}.condition)
+ !isEmpty(condition):!$$qtConfEvaluate($$condition): \
+ return()
+
+ call = $$eval($${opfx}.type)
+ isEmpty(call) {
+ # output is just a string, not an object
+ call = $$eval($$opfx)
+ }
+ !defined("qtConfOutput_$$call", test): \
+ error("Undefined type '$$call' in output '$$2' of feature '$$feature'.")
+
+ condition = $$eval($${opfx}.condition)
+ !isEmpty(condition) {
+ !$$qtConfEvaluate($$condition): \
+ return(false)
+ }
+
+ $${opfx}.feature = $$feature
+ qtConfOutput_$${call}($$opfx, $$eval($${fpfx}.available))
+}
+
+defineTest(qtConfProcessOutput) {
+ !contains($${currentConfig}._KEYS_, "features"): \
+ return()
+
+ basedir = $$shadowed($$eval($${currentConfig}.dir))
+ module = $$eval($${currentConfig}.module)
+
+ # write it to the output files
+ isEmpty($${currentConfig}.files._KEYS_) {
+ # set defaults that should work for most Qt modules
+ isEmpty(module): \
+ error("Neither module nor files section specified in configuration file.")
+
+ $${currentConfig}.files._KEYS_ = publicPro privatePro publicHeader privateHeader
+ $${currentConfig}.files.publicPro = qt$${module}-config.pri
+ $${currentConfig}.files.privatePro = qt$${module}-config.pri # sic!
+ $${currentConfig}.files.publicHeader = qt$${module}-config.h
+ $${currentConfig}.files.privateHeader = qt$${module}-config_p.h
+ }
+
+ for (type, $${currentConfig}.files._KEYS_) {
+ contains(type, ".*Pro") {
+ for (k, $${currentConfig}.output.$${type}.assign._KEYS_): \
+ $${currentConfig}.output.$$type += "$$k = $$eval($${currentConfig}.output.$${type}.assign.$$k)"
+ for (k, $${currentConfig}.output.$${type}.remove._KEYS_): \
+ $${currentConfig}.output.$$type += "$$k -= $$eval($${currentConfig}.output.$${type}.remove.$$k)"
+ for (k, $${currentConfig}.output.$${type}.append._KEYS_): \
+ $${currentConfig}.output.$$type += "$$k += $$eval($${currentConfig}.output.$${type}.append.$$k)"
+ } else {
+ for (define, $${currentConfig}.output.$${type}._KEYS_) {
+ value = $$eval($${currentConfig}.output.$${type}.$${define})
+ $${currentConfig}.output.$$type += "$${LITERAL_HASH}define $$define $$value"
+ }
+ }
+
+ ppScope =
+ !isEmpty(module): ppScope = $${module}_
+ defined(qtConfOutputPostProcess_$${ppScope}$${type}, test): \
+ qtConfOutputPostProcess_$${ppScope}$${type}()
+
+ file = $$eval($${currentConfig}.files.$${type})
+ fileCont.$$file += $$eval($${currentConfig}.output.$${type})
+ fileCont._KEYS_ *= $$file
+ }
+
+ for (file, fileCont._KEYS_): \
+ write_file($$basedir/$$file, fileCont.$$file)|error()
+}
+
+#
+# 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
+ }
+ }
+}
+configsToProcess =
+for (c, cfgs) {
+ s = $$eval(config.$${c}.dir)
+ exists($$s/configure.json): \
+ configsToProcess += $$c
+}
+isEmpty(configsToProcess): \
+ return()
+
+load(configure_base)
+
+QMAKE_POST_CONFIGURE =
+allConfigs =
+for(ever) {
+ isEmpty(configsToProcess): \
+ break()
+
+ currentConfig = config.$$take_first(configsToProcess)
+ thisDir = $$eval($${currentConfig}.dir)
+ jsonFile = $$thisDir/configure.json
+ priFile = $$thisDir/configure.pri
+
+ allConfigs += $$currentConfig
+
+ # load configuration data
+ configure_data = $$cat($$jsonFile, blob)
+ !parseJson(configure_data, $$currentConfig): \
+ error("Invalid or non-existent file $${jsonFile}.")
+ exists($$priFile): \
+ !include($$priFile): error()
+
+ # prepend all subconfigs to files to keep a depth first search order
+ subconfigs =
+ for(n, $${currentConfig}.subconfigs._KEYS_) {
+ subconfig = $$eval($${currentConfig}.subconfigs.$${n})
+ name = $$basename(subconfig)
+ config.$${name}.dir = $$thisDir/$$subconfig
+ subconfigs += $$name
+ }
+ configsToProcess = $$subconfigs $$configsToProcess
+}
+
+for (currentConfig, allConfigs): \
+ qtConfSetupLibraries()
+
+!isEmpty(_QMAKE_SUPER_CACHE_): \
+ QMAKE_CONFIG_CACHE = $$dirname(_QMAKE_SUPER_CACHE_)/config.cache
+else: \
+ QMAKE_CONFIG_CACHE = $$dirname(_QMAKE_CACHE_)/config.cache
+QMAKE_CONFIG_CACHE_USE = all
+
+qtConfParseCommandLine()
+
+!equals(QMAKE_CONFIG_CACHE_USE, none) {
+ include($$QMAKE_CONFIG_CACHE, , true)
+ # this crudely determines when to discard the cache. this also catches the case
+ # of no cache being there in the first place.
+ !equals(cache.platform, $$[QMAKE_SPEC])|!equals(cache.xplatform, $$[QMAKE_XSPEC]): \
+ QMAKE_CONFIG_CACHE_USE = none
+}
+equals(QMAKE_CONFIG_CACHE_USE, none) {
+ cont = \
+ "cache.platform = $$[QMAKE_SPEC]" \
+ "cache.xplatform = $$[QMAKE_XSPEC]"
+ write_file($$QMAKE_CONFIG_CACHE, cont)
+}
+
+for (currentConfig, allConfigs) {
+ qtConfSetModuleName()
+ qtConfSetupModuleOutputs()
+ # do early checks, mainly to validate the command line
+ qtConfProcessEarlyChecks()
+}
+qtConfCheckErrors()
+
+CONFIG += qt_conf_tests_allowed
+logn()
+logn("Running configuration tests...")
+
+for (currentConfig, allConfigs) {
+ tdir = $$eval($${currentConfig}.testDir)
+ isEmpty(tdir): tdir = config.tests
+ QMAKE_CONFIG_TESTS_DIR = $$absolute_path($$tdir, $$eval($${currentConfig}.dir))
+
+ qtConfSetModuleName()
+
+ qtConfSetupTestTypeDeps()
+
+ # correctly setup dependencies
+ QMAKE_CONFIG_DEPS = global global_private
+ !isEmpty($${currentConfig}.module) {
+ for (d, $${currentConfig}.depends._KEYS_) {
+ dep = $$replace($${currentConfig}.depends.$$d, -private$, _private)
+ dep *= $$replace(dep, _private$, )
+ QMAKE_CONFIG_DEPS += $$dep
+ }
+ }
+
+ # process all features
+ qtConfProcessFeatures()
+
+ # generate files and reports
+ qtConfProcessOutput()
+ qtConfCreateReport()
+ qtConfCreateSummary()
+}
+
+# these come from the pri files loaded above.
+for (p, QMAKE_POST_CONFIGURE): \
+ eval($$p)
+
+logn("Done running configuration tests.")
+logn()
+
+logn("Configure summary:")
+logn()
+qtConfPrintReport()
diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf
index 183d0c9502..72dde61a40 100644
--- a/mkspecs/features/qt_docs.prf
+++ b/mkspecs/features/qt_docs.prf
@@ -21,12 +21,16 @@ qtvertag.name = QT_VERSION_TAG
qtvertag.value = $$replace(qtver.value, \.,)
qtdocs.name = QT_INSTALL_DOCS
qtdocs.value = $$[QT_INSTALL_DOCS/src]
-QT_TOOL_ENV = qtver qtmver qtvertag qtdocs
+builddir.name = BUILDDIR
+builddir.value = $$OUT_PWD
+QT_TOOL_ENV = qtver qtmver qtvertag qtdocs builddir
qtPrepareTool(QDOC, qdoc)
QT_TOOL_ENV =
!build_online_docs: qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
+qtPrepareTool(QTATTRIBUTIONSSCANNER, qtattributionsscanner)
+
# qtPrepareTool() must be called outside a build pass, as it protects
# against concurrent wrapper creation by omitting it during build passes.
# However, creating the actual targets is reserved to the build passes.
@@ -63,12 +67,21 @@ DOC_INDEXES =
PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
}
+
+qtattributionsscanner.target = qtattributionsscanner
+qtattributionsscanner.commands = $$QTATTRIBUTIONSSCANNER $$shell_quote($$MODULE_BASE_INDIR) \
+ --filter "QDocModule=$$QMAKE_DOCS_TARGET" -o $$shell_quote($$OUT_PWD/codeattributions.qdoc)
+qtattributionsscanner.CONFIG += phony
+QMAKE_EXTRA_TARGETS += qtattributionsscanner
+
doc_command = $$QDOC $$QMAKE_DOCS
prepare_docs {
prepare_docs.commands += $$doc_command -prepare $$PREP_DOC_INDEXES -no-link-errors
generate_docs.commands += $$doc_command -generate $$DOC_INDEXES
+ prepare_docs.depends += qtattributionsscanner
} else {
html_docs.commands += $$doc_command $$DOC_INDEXES
+ html_docs.depends += qtattributionsscanner
}
!build_online_docs {
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 54641ce5a1..708815d9f9 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -1,10 +1,6 @@
defineReplace(qtPlatformTargetSuffix) {
- ios:CONFIG(simulator, simulator|device): \
- suffix = _$${simulator.sdk}
- else: \
- suffix =
-
+ suffix =
CONFIG(debug, debug|release) {
!debug_and_release|build_pass {
mac: return($${suffix}_debug)
@@ -16,7 +12,7 @@ defineReplace(qtPlatformTargetSuffix) {
defineReplace(qtLibraryTarget) {
LIBRARY_NAME = $$1
- CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
+ CONFIG(shared, static|shared):qtConfig(framework) {
QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
export(QMAKE_FRAMEWORK_BUNDLE_NAME)
}
@@ -171,7 +167,7 @@ defineTest(qtAddToolEnv) {
"EndLocal"
$$1 = call
}
- !build_pass:!write_file($$OUT_PWD/$$batch_name, batch_cont, exe): error("Aborting.")
+ !build_pass:!write_file($$OUT_PWD/$$batch_name, batch_cont, exe): error()
isEmpty(3): \
$$1 += $$shell_quote($$shell_path($$OUT_PWD/$$batch_name))
else: \
@@ -187,8 +183,10 @@ defineTest(qtAddTargetEnv) {
deps = $$replace($$2, -private$, _private)
deps = $$resolve_depends(deps, "QT.", ".depends" ".run_depends")
!isEmpty(deps) {
+ libs = libs
deppath.CONFIG = prepend
equals(QMAKE_HOST.os, Windows) {
+ libs = bins
deppath.CONFIG = always_prepend
deppath.name = PATH
} else:contains(QMAKE_HOST.os, Linux|FreeBSD|OpenBSD|NetBSD|DragonFly|SunOS|HP-UX|QNX|GNU) {
@@ -196,7 +194,7 @@ defineTest(qtAddTargetEnv) {
} else:contains(QMAKE_HOST.os, Haiku) {
deppath.name = LIBRARY_PATH
} else:equals(QMAKE_HOST.os, Darwin) {
- contains(QT_CONFIG, qt_framework): \
+ qtConfig(framework): \
deppath.name = DYLD_FRAMEWORK_PATH
else: \
deppath.name = DYLD_LIBRARY_PATH
@@ -208,9 +206,9 @@ defineTest(qtAddTargetEnv) {
ptypes =
for(dep, deps) {
isEmpty(3): \
- deppath += $$shell_path($$eval(QT.$${dep}.libs))
+ deppath += $$shell_path($$eval(QT.$${dep}.$$libs))
else: \
- deppath += $$system_path($$eval(QT.$${dep}.libs))
+ deppath += $$system_path($$eval(QT.$${dep}.$$libs))
ptypes += $$eval(QT.$${dep}.plugin_types)
}
deppath.value = $$unique(deppath)
@@ -259,7 +257,7 @@ defineReplace(pkgConfigExecutable) {
}
defineTest(packagesExist) {
- contains(QT_CONFIG, no-pkg-config) {
+ !qtConfig(pkg-config) {
warning("pkg-config disabled, can't check package existence")
return(false)
}
@@ -302,3 +300,18 @@ defineTest(prepareRecursiveTarget) {
export($${target}.CONFIG)
export($${target}.recurse_target)
}
+
+defineTest(qtConfig) {
+ modules = $$QT $$QT_PRIVATE $$QT_FOR_CONFIG
+ modules ~= s,-private$,_private,g
+ modules = $$resolve_depends(modules, "QT.", ".depends")
+ modules += global global_private
+ modules = $$reverse(modules)
+ for (module, modules) {
+ contains(QT.$${module}.enabled_features, $$1): \
+ return(true)
+ contains(QT.$${module}.disabled_features, $$1): \
+ return(false)
+ }
+ error("Could not find feature $${1}.")
+}
diff --git a/mkspecs/features/qt_helper_lib.prf b/mkspecs/features/qt_helper_lib.prf
index dc7a5da30e..07e4f48771 100644
--- a/mkspecs/features/qt_helper_lib.prf
+++ b/mkspecs/features/qt_helper_lib.prf
@@ -15,18 +15,42 @@ TEMPLATE = lib
CONFIG -= qt
QT = # In case qt is re-added.
+INCLUDEPATH += $$MODULE_INCLUDEPATH
+DEFINES += $$MODULE_DEFINES
+
CONFIG -= warning_clean # Don't presume 3rd party code to be clean
load(qt_common)
-contains(QT_CONFIG, simulator_and_device): CONFIG += simulator_and_device
-contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release
-contains(QT_CONFIG, build_all): CONFIG += build_all
+qtConfig(debug_and_release): CONFIG += debug_and_release
+qtConfig(build_all): CONFIG += build_all
DESTDIR = $$MODULE_BASE_OUTDIR/lib
DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin
+!build_pass {
+ MODULE = $$replace(TARGET, ^qt, )
+ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_ext_$${MODULE}.pri
+ ucmodule = $$upper($$MODULE)
+
+ MODULE_PRI_CONT = \
+ "QMAKE_INCDIR_$${ucmodule} = $$val_escape(MODULE_INCLUDEPATH)" \
+ "QMAKE_DEFINES_$${ucmodule} = $$val_escape(MODULE_DEFINES)"
+ MODULE_LIBS = -L$$DESTDIR -l$$TARGET
+ debug_and_release {
+ win32: MODULE_DEBUG_LIBS = -L$$DESTDIR -l$${TARGET}d
+ darwin: MODULE_DEBUG_LIBS = -L$$DESTDIR -l$${TARGET}_debug
+ MODULE_PRI_CONT += \
+ "QMAKE_LIBS_$${ucmodule}_DEBUG = $$val_escape(MODULE_DEBUG_LIBS)" \
+ "QMAKE_LIBS_$${ucmodule}_RELEASE = $$val_escape(MODULE_LIBS)"
+ } else {
+ MODULE_PRI_CONT += \
+ "QMAKE_LIBS_$${ucmodule} = $$val_escape(MODULE_LIBS)"
+ }
+ write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
+}
+
# In static builds of Qt, convenience libraries must be installed,
# as in this case they are not linked to the final library/plugin.
-installed|if(!not_installed:contains(QT_CONFIG, static)): load(qt_installs)
+installed|if(!not_installed:qtConfig(static)): load(qt_installs)
TARGET = $$qt5LibraryTarget($$TARGET)
diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf
index 3a5dbb6274..0d3dfb6b93 100644
--- a/mkspecs/features/qt_installs.prf
+++ b/mkspecs/features/qt_installs.prf
@@ -36,7 +36,7 @@ qt_install_headers {
targ_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME
INSTALLS += targ_headers
- private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES
+ private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.INJECTED_PRIVATE_HEADER_FILES
private_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private
INSTALLS += private_headers
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index d9011f5482..954fdb2501 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -9,20 +9,15 @@
# We mean it.
#
-!no_qt_module_warning:!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) {
- QMAKE_ACTUAL_PRO_FILE = $$basename(_PRO_FILE_)
- isEmpty(QMAKE_ACTUAL_PRO_FILE): QMAKE_ACTUAL_PRO_FILE=.pro
- warning("You should probably load(qt_build_config) first in $$QMAKE_ACTUAL_PRO_FILE for $$TARGET, as the latter also load()s qt_module.")
- message("Not doing so may lead to qt_module.prf overriding compiler/linker options in your .pro file.")
- message("Ignore this warning with CONFIG+=no_qt_module_warning if you know what you are doing.")
- unset(QMAKE_ACTUAL_PRO_FILE)
-}
-load(qt_build_config) # loads qmodule.pri if hasn't been loaded already
-
isEmpty(MODULE):MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0)
isEmpty(VERSION): VERSION = $$MODULE_VERSION
isEmpty(VERSION): error("Module does not define version.")
+exists($$OUT_PWD/qt$${MODULE}-config.pri) {
+ include($$OUT_PWD/qt$${MODULE}-config.pri)
+ CONFIG += generated_privates
+}
+
# Compile as shared/DLL or static according to the option given to configure
# unless overridden. Host builds are always static
host_build|staticlib: CONFIG += static
@@ -32,17 +27,17 @@ host_build {
QMAKE_CFLAGS += $$QMAKE_CFLAGS_SPLIT_SECTIONS
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_SPLIT_SECTIONS
force_bootstrap {
- !build_pass:contains(QT_CONFIG, release_tools): CONFIG += release
+ !build_pass:qtConfig(release_tools): CONFIG += release
contains(QT, core(-private)?|xml) {
QT -= core core-private xml
QT += bootstrap-private
}
} else {
- !build_pass:contains(QT_CONFIG, debug_and_release): CONFIG += release
+ !build_pass:qtConfig(debug_and_release): CONFIG += release
}
}
-CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework): \
+CONFIG(shared, static|shared):qtConfig(framework): \
CONFIG += lib_bundle
CONFIG += relative_qt_rpath # Qt libraries should be relocatable
@@ -74,7 +69,7 @@ header_module {
TEMPLATE = lib
}
DESTDIR = $$MODULE_BASE_OUTDIR/lib
-win32:!wince:!prefix_build: DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin
+DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin
CONFIG += qmake_cache target_qt
@@ -89,15 +84,16 @@ INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}_private.inclu
# If Qt was configured with -debug-and-release then build the module the same way
# - unless this is a host library
!host_build:if(win32|mac):!macx-xcode {
- contains(QT_CONFIG, simulator_and_device): CONFIG += simulator_and_device
- contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release
- contains(QT_CONFIG, build_all): CONFIG += build_all
+ qtConfig(debug_and_release): CONFIG += debug_and_release
+ qtConfig(build_all): CONFIG += build_all
}
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
-QT += $$QT_FOR_PRIVATE
+QT_PRIVATE += $$QT_FOR_PRIVATE
unset(QT_FOR_PRIVATE)
+QMAKE_USE_PRIVATE += $$QMAKE_USE_FOR_PRIVATE
+unset(QMAKE_USE_FOR_PRIVATE)
!internal_module:CONFIG += create_cmake
@@ -114,15 +110,17 @@ lib_bundle {
CONFIG += sliced_bundle
header_module {
CONFIG += bundle
+ QMAKE_BUNDLE_NAME = $$TARGET
QMAKE_BUNDLE_EXTENSION = .framework
QMAKE_INFO_PLIST = $$QMAKESPEC/Info.plist.lib
}
- !debug_and_release|!build_all|CONFIG(release, debug|release) {
+ !build_all| \
+ if(if(!debug_and_release|CONFIG(release, debug|release))) {
FRAMEWORK_HEADERS.version = Versions
FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
FRAMEWORK_HEADERS.path = Headers
FRAMEWORK_PRIVATE_HEADERS.version = Versions
- FRAMEWORK_PRIVATE_HEADERS.files = $$SYNCQT.PRIVATE_HEADER_FILES
+ FRAMEWORK_PRIVATE_HEADERS.files = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.INJECTED_PRIVATE_HEADER_FILES
FRAMEWORK_PRIVATE_HEADERS.path = Headers/$$VERSION/$$MODULE_INCNAME/private
FRAMEWORK_QPA_HEADERS.version = Versions
FRAMEWORK_QPA_HEADERS.files = $$SYNCQT.QPA_HEADER_FILES
@@ -137,7 +135,7 @@ mac {
QMAKE_CXXFLAGS += -fconstant-cfstrings
}
- contains(QT_CONFIG, rpath): \
+ qtConfig(rpath): \
QMAKE_SONAME_PREFIX = @rpath
else: \
CONFIG += absolute_library_soname
@@ -164,7 +162,7 @@ aix-g++* {
QMAKE_CXXFLAGS += -mminimal-toc
}
-sse2:!contains(QT_CPU_FEATURES.$$QT_ARCH, sse2):!host_build:!if(static:contains(QT_CONFIG, shared)) {
+sse2:!contains(QT_CPU_FEATURES.$$QT_ARCH, sse2):!host_build:!if(static:qtConfig(shared)) {
# If the compiler supports SSE2, enable it unconditionally in all of Qt shared libraries
# (and only the libraries). This is not expected to be a problem because:
# - on Windows, sharing of libraries is uncommon
@@ -232,7 +230,7 @@ android: CONFIG += qt_android_deps no_linker_version_script
verscript = $$verscript_in
}
- write_file($$OUT_PWD/$$verscript, verscript_content)|error("Aborting.")
+ write_file($$OUT_PWD/$$verscript, verscript_content)|error()
unset(current)
unset(previous)
unset(verscript)
diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf
index 05d0706a33..790a4ee29e 100644
--- a/mkspecs/features/qt_module_headers.prf
+++ b/mkspecs/features/qt_module_headers.prf
@@ -16,7 +16,7 @@ load(qt_build_paths)
minimal_syncqt {
QMAKE_SYNCQT += -minimal $$QMAKE_SYNCQT_OPTIONS
} else {
- contains(QT_CONFIG, private_tests): \ # -developer-build
+ qtConfig(private_tests): \ # -developer-build
QMAKE_SYNCQT += -check-includes
}
for(mod, MODULE_INCNAME): \
@@ -104,18 +104,33 @@ include($$INC_PATH/include/$$MODULE_INCNAME/headers.pri, "", true)
alien_syncqt: return()
+MODULE_INC_OUTDIR = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME
+
+exists($$OUT_PWD/qt$${MODULE}-config.h) {
+ fwd_rel = $$relative_path($$OUT_PWD, $$MODULE_INC_OUTDIR)
+ SYNCQT.INJECTIONS += \
+ $$fwd_rel/qt$${MODULE}-config.h:qt$${MODULE}-config.h \
+ $$fwd_rel/qt$${MODULE}-config_p.h:$$MODULE_VERSION/$$MODULE_INCNAME/private/qt$${MODULE}-config_p.h
+ inst_rel = $$relative_path($$OUT_PWD, $$_PRO_FILE_PWD_)
+ SYNCQT.HEADER_FILES += $$inst_rel/qt$${MODULE}-config.h
+ SYNCQT.INJECTED_PRIVATE_HEADER_FILES += $$inst_rel/qt$${MODULE}-config_p.h
+}
+
for (injection, SYNCQT.INJECTIONS) {
injects = $$split(injection, :)
+ dst_hdr = $$absolute_path($$member(injects, 0), $$MODULE_INC_OUTDIR)
fwd_hdr = $$member(injects, 1)
- MAIN_FWD = $$INC_PATH/include/$$MODULE_INCNAME/$$fwd_hdr
- MAIN_FWD_CONT = '$${LITERAL_HASH}include "$$member(injects, 0)"'
- write_file($$MAIN_FWD, MAIN_FWD_CONT)|error("Aborting.")
+ MAIN_FWD = $$MODULE_INC_OUTDIR/$$fwd_hdr
+ MAIN_FWD_CONT = '$${LITERAL_HASH}include "$$relative_path($$dst_hdr, $$dirname(MAIN_FWD))"'
+ write_file($$MAIN_FWD, MAIN_FWD_CONT)|error()
+ touch($$MAIN_FWD, $$dst_hdr)
!git_build: QMAKE_DISTCLEAN += $$MAIN_FWD
injects = $$member(injects, 2, -1)
for (inject, injects) {
- CLASS_FWD = $$INC_PATH/include/$$MODULE_INCNAME/$$inject
+ CLASS_FWD = $$MODULE_INC_OUTDIR/$$inject
CLASS_FWD_CONT = '$${LITERAL_HASH}include "$$fwd_hdr"'
- write_file($$CLASS_FWD, CLASS_FWD_CONT)|error("Aborting.")
+ write_file($$CLASS_FWD, CLASS_FWD_CONT)|error()
+ touch($$CLASS_FWD, $$dst_hdr)
!git_build: QMAKE_DISTCLEAN += $$CLASS_FWD
}
}
@@ -135,7 +150,7 @@ MODULE_MASTER_DEPS_HEADER = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/$${MOD
MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}include <$$depname/$$depname>"
}
MODULE_MASTER_DEPS_HEADER_CONT += "$${LITERAL_HASH}endif"
- write_file($$MODULE_MASTER_DEPS_HEADER, MODULE_MASTER_DEPS_HEADER_CONT)|error("Aborting.")
+ write_file($$MODULE_MASTER_DEPS_HEADER, MODULE_MASTER_DEPS_HEADER_CONT)|error()
!git_build: QMAKE_DISTCLEAN += $$MODULE_MASTER_DEPS_HEADER
}
SYNCQT.HEADER_FILES += $$MODULE_MASTER_DEPS_HEADER
@@ -227,17 +242,24 @@ headersclean:!internal_module {
$$[QT_INSTALL_DATA/src]/mkspecs/features/data/dummy.cpp
}
- !isEmpty(hcleanCOMMAND):if(!contains(QT_CONFIG, debug_and_release)|CONFIG(release, debug|release)) {
+ !isEmpty(hcleanCOMMAND):if(!qtConfig(debug_and_release)|CONFIG(release, debug|release)) {
+ CLEAN_HEADERS =
+ for (h, SYNCQT.CLEAN_HEADER_FILES) {
+ hh = $$split(h, :)
+ hr = $$member(hh, 1)
+ isEmpty(hr)|qtConfig($$hr): \
+ CLEAN_HEADERS += $$member(hh, 0)
+ }
+ CLEAN_HEADERS -= $$HEADERSCLEAN_EXCLUDE
header_check.dependency_type = TYPE_C
header_check.CONFIG += no_link
header_check.output = ${QMAKE_VAR_OBJECTS_DIR}header_${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
- header_check.input = SYNCQT.CLEAN_HEADER_FILES
+ header_check.input = CLEAN_HEADERS
header_check.variable_out = PRE_TARGETDEPS
header_check.name = headercheck ${QMAKE_FILE_IN}
header_check.commands = $$hcleanCOMMAND
silent:header_check.commands = @echo compiling[header] ${QMAKE_FILE_IN} && $$hcleanCOMMAND
QMAKE_EXTRA_COMPILERS += header_check
- SYNCQT.CLEAN_HEADER_FILES -= $$HEADERSCLEAN_EXCLUDE
}
unset(hcleanCOMMAND)
unset(hcleanFLAGS)
diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf
index 95b4b586a8..57160d11eb 100644
--- a/mkspecs/features/qt_module_pris.prf
+++ b/mkspecs/features/qt_module_pris.prf
@@ -35,6 +35,37 @@ else: \
MODULE_PRI = $$mod_inst_pfx/qt_lib_$${MODULE_ID}.pri
MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
+defineReplace(qtGetFeaturesForModule) {
+ enabled = $$unique(QT.$${1}.enabled_features)
+ disabled = $$unique(QT.$${1}.disabled_features)
+ result = \
+ "QT.$${1}.enabled_features =$$join(enabled, " ", " ")" \
+ "QT.$${1}.disabled_features =$$join(disabled, " ", " ")"
+ return($$result)
+}
+
+defineReplace(qtGetExportsForModule) {
+ result =
+ for (var, QT.$${1}.exports): \
+ result += "$$var = $$val_escape($$var)"
+ return($$result)
+}
+
+defineReplace(qtExportLibsForModule) {
+ result =
+ for (lib, QT.$${1}.libraries) {
+ NAME = $$upper($$lib)
+ vars = \
+ QMAKE_LIBS_$$NAME QMAKE_LIBS_$${NAME}_DEBUG QMAKE_LIBS_$${NAME}_RELEASE \
+ QMAKE_DEFINES_$$NAME QMAKE_INCDIR_$$NAME
+ for (var, vars) {
+ !isEmpty($$var): \
+ result += "$$var = $$val_escape($$var)"
+ }
+ }
+ return($$result)
+}
+
!build_pass {
# Create a module .pri file
@@ -99,15 +130,19 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
MODULE_PRI_CONT += \
"QT.$${MODULE_ID}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
$$module_rundep \
+ "QT.$${MODULE_ID}.uses =$$join(QMAKE_USE, " ", " ")" \
"QT.$${MODULE_ID}.module_config =$$join(module_build_type, " ", " ")" \
$$module_config \
"QT.$${MODULE_ID}.DEFINES = $$val_escape(MODULE_DEFINES)" \
+ $$qtGetFeaturesForModule($$MODULE_ID) \
+ $$qtGetExportsForModule($$MODULE_ID) \
+ "QT_CONFIG +=$$join(QT.$${MODULE_ID}.QT_CONFIG, " ", " ")" \
"" \
"QT_MODULES += $$MODULE"
winrt: MODULE_PRI_CONT += \
"QT.$${MODULE_ID}.winrt_capabilities =$$join(MODULE_WINRT_CAPABILITIES, " ", " ")" \
"QT.$${MODULE_ID}.winrt_capabilities_device =$$join(MODULE_WINRT_CAPABILITIES_DEVICE, " ", " ")"
- write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
+ write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
!internal_module:!no_private_module {
module_build_type += internal_module
private_deps = $$QT
@@ -126,8 +161,12 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
"QT.$${MODULE}_private.includes = $$MODULE_PRIVATE_INCLUDES" \
"QT.$${MODULE}_private.frameworks =" \
"QT.$${MODULE}_private.depends = $$private_deps" \
- "QT.$${MODULE}_private.module_config =$$join(module_build_type, " ", " ")"
- write_file($$MODULE_PRIVATE_PRI, MODULE_PRIVATE_PRI_CONT)|error("Aborting.")
+ "QT.$${MODULE}_private.uses =$$join(QMAKE_USE_FOR_PRIVATE, " ", " ")" \
+ "QT.$${MODULE}_private.module_config =$$join(module_build_type, " ", " ")" \
+ $$qtGetFeaturesForModule($${MODULE}_private) \
+ "" \
+ $$qtExportLibsForModule($${MODULE}_private)
+ write_file($$MODULE_PRIVATE_PRI, MODULE_PRIVATE_PRI_CONT)|error()
}
MODULE_PRI_FILES = $$MODULE_PRI $$MODULE_PRIVATE_PRI
@@ -162,7 +201,7 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
MODULE_FWD_PRI_CONT += \
"QT.$${MODULE}_private.includes $$pls= $$MODULE_FWD_PRIVATE_INCLUDES"
}
- write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
+ write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error()
touch($$MODULE_FWD_PRI, $$MODULE_PRI)
MODULE_PRI_FILES += $$MODULE_FWD_PRI
diff --git a/mkspecs/features/qt_parts.prf b/mkspecs/features/qt_parts.prf
index 877bd60321..0accef6665 100644
--- a/mkspecs/features/qt_parts.prf
+++ b/mkspecs/features/qt_parts.prf
@@ -12,6 +12,8 @@
# Ensure that each module has a .qmake.cache when properly qmake'd.
cache()
+load(qt_configure)
+
load(qt_build_config)
TEMPLATE = subdirs
@@ -60,7 +62,7 @@ exists($$_PRO_FILE_PWD_/tests/tests.pro) {
sub_tests.CONFIG = no_default_install
!contains(QT_BUILD_PARTS, tests) {
sub_tests.CONFIG += no_default_target
- } else: !ios {
+ } else: !uikit {
# Make sure these are there in case we need them
sub_tools.CONFIG -= no_default_target
sub_examples.CONFIG -= no_default_target
@@ -74,6 +76,7 @@ QT_BUILD_PARTS -= libs tools examples tests
QMAKE_DISTCLEAN += \
.qmake.cache \
+ config.cache \
config.log \
mkspecs/modules/*.pri \
mkspecs/modules-inst/*.pri
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
index 8e47d91133..265b4ea8a2 100644
--- a/mkspecs/features/qt_plugin.prf
+++ b/mkspecs/features/qt_plugin.prf
@@ -24,11 +24,10 @@ win32:CONFIG(shared, static|shared) {
}
tool_plugin {
- !build_pass:contains(QT_CONFIG, debug_and_release): CONFIG += release
+ !build_pass:qtConfig(debug_and_release): CONFIG += release
} else:if(win32|mac):!macx-xcode {
- contains(QT_CONFIG, simulator_and_device): CONFIG += simulator_and_device
- contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release
- contains(QT_CONFIG, build_all): CONFIG += build_all
+ qtConfig(debug_and_release): CONFIG += debug_and_release
+ qtConfig(build_all): CONFIG += build_all
}
CONFIG += relative_qt_rpath # Qt's plugins should be relocatable
@@ -50,7 +49,7 @@ CONFIG(static, static|shared)|prefix_build {
"QT_PLUGIN.$${MODULE}.EXTENDS =$$join(PLUGIN_EXTENDS, " ", " ")" \
"QT_PLUGIN.$${MODULE}.CLASS_NAME = $$PLUGIN_CLASS_NAME" \
"QT_PLUGINS += $$MODULE"
- write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
+ write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
MODULE_PRI_FILES = $$MODULE_PRI
force_independent {
@@ -59,7 +58,7 @@ CONFIG(static, static|shared)|prefix_build {
MODULE_FWD_PRI_CONT = \
"QT_PLUGIN.$${MODULE}.PATH = $$MODULE_BASE_OUTDIR/plugins" \
"include($$MODULE_PRI)"
- write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
+ write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error()
touch($$MODULE_FWD_PRI, $$MODULE_PRI)
MODULE_PRI_FILES += $$MODULE_FWD_PRI
@@ -92,5 +91,4 @@ CONFIG += create_cmake
load(qt_targets)
load(qt_common)
-wince: LIBS += $$QMAKE_LIBS_GUI
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
index bdeb59c83d..4b73b4b8f7 100644
--- a/mkspecs/features/qt_tool.prf
+++ b/mkspecs/features/qt_tool.prf
@@ -9,6 +9,7 @@
# We mean it.
#
+CONFIG += no_launch_target
load(qt_app)
CONFIG += console
@@ -60,7 +61,7 @@ DEFINES *= QT_USE_QSTRINGBUILDER
"QT_TOOL.$${MODULE}.binary = $$val_escape(bin)" \
"QT_TOOL.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
$$module_envvars
- write_file($$TOOL_PRI, TOOL_PRI_CONT)|error("Aborting.")
+ write_file($$TOOL_PRI, TOOL_PRI_CONT)|error()
# Then, inject the new tool into the current cache state
!contains(QMAKE_INTERNAL_INCLUDED_FILES, $$TOOL_PRI) { # before the actual include()!
diff --git a/mkspecs/features/resolve_config.prf b/mkspecs/features/resolve_config.prf
index b712a2b58e..816c3b680d 100644
--- a/mkspecs/features/resolve_config.prf
+++ b/mkspecs/features/resolve_config.prf
@@ -41,7 +41,7 @@ CONFIG(debug, debug|release) {
# or not debug_and_release is active.
for(build, $$list(debug release)) {
suffix =
- contains(QT_CONFIG, debug_and_release) {
+ qtConfig(debug_and_release) {
equals(build, debug): \
suffix = _debug
} else {
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
index 21147e4a42..adc8e9a8ac 100644
--- a/mkspecs/features/resources.prf
+++ b/mkspecs/features/resources.prf
@@ -65,7 +65,7 @@ for(resource, RESOURCES) {
"</RCC>"
!write_file($$OUT_PWD/$$resource_file, resource_file_content): \
- error("Aborting.")
+ error()
}
RESOURCES -= $$resource
diff --git a/mkspecs/features/spec_pre.prf b/mkspecs/features/spec_pre.prf
index 090f348ebf..51ea3a8321 100644
--- a/mkspecs/features/spec_pre.prf
+++ b/mkspecs/features/spec_pre.prf
@@ -51,5 +51,5 @@ equals(QMAKE_HOST.os, Windows) {
QMAKE_SH = sh
}
-CONFIG = file_copies qt warn_on release link_prl
+CONFIG = file_copies qmake_use qt warn_on release link_prl
QT = core gui
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf
index 08ed00715d..83ff177856 100644
--- a/mkspecs/features/testcase.prf
+++ b/mkspecs/features/testcase.prf
@@ -1,4 +1,4 @@
-have_target {
+!have_target: return()
# qt_build_config.prf disables execptions for all Qt modules which don't
# explicitly turn it on again, while the qmake default is to build with
@@ -181,6 +181,11 @@ isEmpty(BUILDS)|build_pass {
builtin_testdata {
ALL_TESTDATA = $$TESTDATA $$GENERATED_TESTDATA
+
+ # BLACKLIST needs to be added to the testdata
+ BLACKLISTPATH = $$_PRO_FILE_PWD_/BLACKLIST
+ exists($$BLACKLISTPATH): ALL_TESTDATA *= $$BLACKLISTPATH
+
# RESOURCES does not support wildcards (for good reasons)
for(td, ALL_TESTDATA): \
testdata.files += $$files($$absolute_path($$td, $$_PRO_FILE_PWD_))
@@ -199,5 +204,3 @@ macx-xcode:bundle:isEmpty(QMAKE_BUNDLE_EXTENSION) {
QMAKE_BUNDLE_EXTENSION = .xctest
}
-} # have_target
-
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
index 7691b7db34..3f266dd2a4 100644
--- a/mkspecs/features/toolchain.prf
+++ b/mkspecs/features/toolchain.prf
@@ -1,4 +1,14 @@
+defineReplace(qtMakeExpand) {
+ out = "$$1"
+ for(ever) {
+ m = $$replace(out, ".*\\$\\(EXPORT_([^)]+)\\).*", \\1)
+ equals(m, $$out): \
+ return($$out)
+ out = $$replace(out, "\\$\\(EXPORT_$$m\\)", $$eval($$m))
+ }
+}
+
isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build {
#
# Get default include and library paths from compiler
@@ -11,7 +21,7 @@ isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build {
cmd_prefix = "set LC_ALL=C&"
cmd_suffix = "<NUL >NUL"
}
- output = $$system("$$cmd_prefix $$QMAKE_CXX $$QMAKE_CXXFLAGS -xc++ -E -v - 2>&1 $$cmd_suffix", lines)
+ output = $$system("$$cmd_prefix $$QMAKE_CXX $$qtMakeExpand($$QMAKE_CXXFLAGS) -xc++ -E -v - 2>&1 $$cmd_suffix", lines)
add_includes = false
for (line, output) {
line ~= s/^ *// # remove leading spaces
@@ -30,6 +40,11 @@ isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build {
}
}
QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS)
+ } else: msvc {
+ LIB = $$getenv("LIB")
+ QMAKE_DEFAULT_LIBDIRS = $$split(LIB, $$QMAKE_DIRLIST_SEP)
+ INCLUDE = $$getenv("INCLUDE")
+ QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP)
}
unix {
diff --git a/mkspecs/features/uikit/bitcode.prf b/mkspecs/features/uikit/bitcode.prf
new file mode 100644
index 0000000000..a1dff19eb3
--- /dev/null
+++ b/mkspecs/features/uikit/bitcode.prf
@@ -0,0 +1,15 @@
+lessThan(QMAKE_XCODE_VERSION, "7.0") {
+ warning("You need to update Xcode to version 7 or newer to support bitcode")
+} else {
+ release:device {
+ QMAKE_CFLAGS += -fembed-bitcode
+ QMAKE_CXXFLAGS += -fembed-bitcode
+ QMAKE_OBJECTIVE_CFLAGS += -fembed-bitcode
+ QMAKE_LFLAGS += -fembed-bitcode
+ } else {
+ QMAKE_CFLAGS += -fembed-bitcode-marker
+ QMAKE_CXXFLAGS += -fembed-bitcode-marker
+ QMAKE_OBJECTIVE_CFLAGS += -fembed-bitcode-marker
+ QMAKE_LFLAGS += -fembed-bitcode-marker
+ }
+}
diff --git a/mkspecs/features/uikit/default_post.prf b/mkspecs/features/uikit/default_post.prf
new file mode 100644
index 0000000000..8f1c5280b8
--- /dev/null
+++ b/mkspecs/features/uikit/default_post.prf
@@ -0,0 +1,100 @@
+equals(TEMPLATE, app):qt {
+ # If the application uses Qt, it needs to be an application bundle
+ # to be able to deploy and run on iOS. The only exception to this
+ # is if you're working with a jailbroken device and can run the
+ # resulting binary from the console/over SSH, but that's not a
+ # use-case we care about, so no need to complicate the logic.
+ CONFIG *= app_bundle
+
+ # For Qt applications we want Xcode project files as the generated output,
+ # but since qmake doesn't handle the transition between makefiles and Xcode
+ # project files (which happens when using subdirs), we can't just override
+ # MAKEFILE_GENERATOR. Instead, we generate the Xcode project by spawning a
+ # child qmake process with -spec macx-xcode and let the top level qmake
+ # process generate a wrapper makefile that forwards everything to xcodebuild.
+ equals(MAKEFILE_GENERATOR, UNIX): \
+ CONFIG = xcodebuild $$CONFIG
+}
+
+load(default_post)
+
+macx-xcode {
+ ios:isEmpty(QMAKE_APPLE_TARGETED_DEVICE_FAMILY):!isEmpty(QMAKE_IOS_TARGETED_DEVICE_FAMILY) {
+ warning("QMAKE_IOS_TARGETED_DEVICE_FAMILY is deprecated; use QMAKE_APPLE_TARGETED_DEVICE_FAMILY")
+ QMAKE_APPLE_TARGETED_DEVICE_FAMILY = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY
+ }
+
+ device_family.name = TARGETED_DEVICE_FAMILY
+ device_family.value = $$QMAKE_APPLE_TARGETED_DEVICE_FAMILY
+ QMAKE_MAC_XCODE_SETTINGS += device_family
+
+ ios {
+ # Set up default 4-inch iPhone/iPod launch image so that our apps
+ # support the full screen resolution of those devices.
+ qmake_launch_image = Default-568h@2x.png
+ qmake_copy_image.input = $$QMAKESPEC/$$qmake_launch_image
+ qmake_copy_image.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$qmake_launch_image
+ qmake_copy_image.CONFIG = verbatim
+ QMAKE_SUBSTITUTES += qmake_copy_image
+ qmake_launch_images.files = $$qmake_copy_image.output
+ QMAKE_BUNDLE_DATA += qmake_launch_images
+
+ lessThan(QMAKE_XCODE_VERSION, "6.0") {
+ warning("You need to update Xcode to version 6 or newer to fully support iPhone6/6+")
+ } else {
+ # Set up default LaunchScreen to support iPhone6/6+
+ qmake_launch_screen = LaunchScreen.xib
+ qmake_copy_launch_screen.input = $$QMAKESPEC/$$qmake_launch_screen
+ qmake_copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$qmake_launch_screen
+ QMAKE_SUBSTITUTES += qmake_copy_launch_screen
+ qmake_launch_screens.files = $$qmake_copy_launch_screen.output
+ QMAKE_BUNDLE_DATA += qmake_launch_screens
+ }
+ }
+}
+
+macx-xcode {
+ arch_device.name = "ARCHS[sdk=$${device.sdk}*]"
+ arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]"
+
+ arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS
+ arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS
+ QMAKE_XCODE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS $$QMAKE_APPLE_SIMULATOR_ARCHS
+
+ QMAKE_MAC_XCODE_SETTINGS += arch_device arch_simulator
+
+ only_active_arch.name = ONLY_ACTIVE_ARCH
+ only_active_arch.value = YES
+ 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
+
+ isEmpty(VALID_ARCHS): \
+ error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture")
+
+ single_arch: VALID_ARCHS = $$first(VALID_ARCHS)
+
+ ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS))
+ ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch))
+
+ QMAKE_EXTRA_VARIABLES += VALID_ARCHS ACTIVE_ARCHS ARCH_ARGS
+
+ arch_flags = $(EXPORT_ARCH_ARGS)
+
+ QMAKE_CFLAGS += $$arch_flags
+ QMAKE_CXXFLAGS += $$arch_flags
+ QMAKE_LFLAGS += $$arch_flags
+
+ QMAKE_PCH_ARCHS = $$VALID_ARCHS
+}
+
+!xcodebuild:equals(TEMPLATE, app):!isEmpty(QMAKE_INFO_PLIST) {
+ # Only link in photo library support if Info.plist contains
+ # NSPhotoLibraryUsageDescription. Otherwise it will be rejected from AppStore.
+ plist_path = $$absolute_path($$QMAKE_INFO_PLIST, $$_PRO_FILE_PWD_)
+ system("/usr/libexec/PlistBuddy -c 'Print NSPhotoLibraryUsageDescription' $$system_quote($$plist_path) &>/dev/null"): \
+ QTPLUGIN += qiosnsphotolibrarysupport
+}
diff --git a/mkspecs/features/uikit/default_pre.prf b/mkspecs/features/uikit/default_pre.prf
new file mode 100644
index 0000000000..ecc3b9d3ab
--- /dev/null
+++ b/mkspecs/features/uikit/default_pre.prf
@@ -0,0 +1,25 @@
+sim_and_dev = false
+!isEmpty(QT_VERSION):qtConfig(simulator_and_device): \
+ sim_and_dev = true
+
+$$sim_and_dev|contains(QMAKE_MAC_SDK, ^$${device.sdk}.*): \
+ CONFIG += device $${device.sdk}
+$$sim_and_dev|contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \
+ CONFIG += simulator $${simulator.sdk}
+
+$$sim_and_dev {
+ # 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
+}
+
+unset(sim_and_dev)
+
+load(default_pre)
+
+# Check for supported Xcode versions
+lessThan(QMAKE_XCODE_VERSION, "4.3"): \
+ error("This mkspec requires Xcode 4.3 or later")
diff --git a/mkspecs/macx-ios-clang/ios_destinations.sh b/mkspecs/features/uikit/device_destinations.sh
index d80a5cecf4..162ad01aaf 100755
--- a/mkspecs/macx-ios-clang/ios_destinations.sh
+++ b/mkspecs/features/uikit/device_destinations.sh
@@ -40,10 +40,10 @@
#############################################################################
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-booted_simulator=$($DIR/ios_devices.pl "iPhone|iPad" "Booted" "NOT unavailable" | tail -n 1)
-echo "IPHONESIMULATOR_DEVICES = $booted_simulator"
+booted_simulator=$($DIR/devices.pl "$1" "Booted" "NOT unavailable" | tail -n 1)
+echo "SIMULATOR_DEVICES = $booted_simulator"
-xcodebuild test -scheme $1 -destination 'id=0' -destination-timeout 1 2>&1| sed -n 's/{ \(platform:.*\) }/\1/p' | while read destination; do
+xcodebuild test -scheme $2 -destination 'id=0' -destination-timeout 1 2>&1| sed -n 's/{ \(platform:.*\) }/\1/p' | while read destination; do
id=$(echo $destination | sed -n -E 's/.*id:([^ ,]+).*/\1/p')
[[ $id == *"placeholder"* ]] && continue
@@ -54,9 +54,17 @@ xcodebuild test -scheme $1 -destination 'id=0' -destination-timeout 1 2>&1| sed
if [ $key = 'PLATFORM' ]; then
if [ "$val" = "iOS" ]; then
- echo "IPHONEOS_DEVICES += $id"
+ echo "HARDWARE_DEVICES += $id"
elif [ "$val" = "iOS Simulator" -a "$id" != "$booted_simulator" ]; then
- echo "IPHONESIMULATOR_DEVICES += $id"
+ echo "SIMULATOR_DEVICES += $id"
+ elif [ "$val" = "tvOS" ]; then
+ echo "HARDWARE_DEVICES += $id"
+ elif [ "$val" = "tvOS Simulator" -a "$id" != "$booted_simulator" ]; then
+ echo "SIMULATOR_DEVICES += $id"
+ elif [ "$val" = "watchOS" ]; then
+ echo "HARDWARE_DEVICES += $id"
+ elif [ "$val" = "watchOS Simulator" -a "$id" != "$booted_simulator" ]; then
+ echo "SIMULATOR_DEVICES += $id"
fi
fi
done
diff --git a/mkspecs/macx-ios-clang/ios_devices.pl b/mkspecs/features/uikit/devices.pl
index eb45d1dab9..eb45d1dab9 100755
--- a/mkspecs/macx-ios-clang/ios_devices.pl
+++ b/mkspecs/features/uikit/devices.pl
diff --git a/mkspecs/macx-ios-clang/features/exclusive_builds_post.prf b/mkspecs/features/uikit/exclusive_builds_post.prf
index 1fb0a55846..1fb0a55846 100644
--- a/mkspecs/macx-ios-clang/features/exclusive_builds_post.prf
+++ b/mkspecs/features/uikit/exclusive_builds_post.prf
diff --git a/mkspecs/macx-ios-clang/features/qt.prf b/mkspecs/features/uikit/qt.prf
index 474a195e4b..4475c137dc 100644
--- a/mkspecs/macx-ios-clang/features/qt.prf
+++ b/mkspecs/features/uikit/qt.prf
@@ -1,22 +1,24 @@
qt_depends = $$resolve_depends(QT, "QT.")
-equals(TEMPLATE, app):contains(qt_depends, gui(-private)?) {
+!watchos:equals(TEMPLATE, app):contains(qt_depends, gui(-private)?) {
LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/platforms
lib_name = qios
lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/lib$${lib_name}$$qtPlatformTargetSuffix()
LIBS += -l$${lib_name}$$qtPlatformTargetSuffix() $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS)
- # By marking qt_registerPlatformPlugin as undefined, we ensure that
- # the plugin.o translation unit is considered for inclusion in
- # the final binary, which in turn ensures that the plugin's
- # static initializer is included and run.
- QMAKE_LFLAGS += -u _qt_registerPlatformPlugin
+ !bitcode {
+ # By marking qt_registerPlatformPlugin as undefined, we ensure that
+ # the plugin.o translation unit is considered for inclusion in
+ # the final binary, which in turn ensures that the plugin's
+ # static initializer is included and run.
+ QMAKE_LFLAGS += -u _qt_registerPlatformPlugin
- # We do link and dependency resolution for the platform plugin
- # manually, since we know we always need the plugin, so we don't
- # need to generate an import for it.
- QTPLUGIN.platforms = -
+ # We do link and dependency resolution for the platform plugin
+ # manually, since we know we always need the plugin, so we don't
+ # need to generate an import for it.
+ QTPLUGIN.platforms = -
+ }
!no_main_wrapper {
# The LC_MAIN load command available in iOS 6.0 and above allows dyld to
diff --git a/mkspecs/macx-ios-clang/features/qt_config.prf b/mkspecs/features/uikit/qt_config.prf
index d746cba9d9..5fa5a536f8 100644
--- a/mkspecs/macx-ios-clang/features/qt_config.prf
+++ b/mkspecs/features/uikit/qt_config.prf
@@ -5,10 +5,13 @@ isEmpty(QT_ARCH) {
# means we fail to pass -arch to the compiler, resulting in broke tests.
# As the Xcode toolchain doesn't seem to have a way to auto-detect the
# arch based on the SDK, we have to hard-code the arch for configure.
- contains(QMAKE_MAC_SDK, $${device.sdk}.*): \
+ contains(QMAKE_MAC_SDK, $${device.sdk}.*) {
QT_ARCH = arm
- else: \ # Simulator
- QT_ARCH = i386
+ } else { # Simulator
+ ios: QT_ARCH = i386
+ tvos: QT_ARCH = x64
+ watchos: QT_ARCH = i386
+ }
# Prevent the arch/config tests from building as multi-arch binaries,
# as we only want the lowest common denominator features.
diff --git a/mkspecs/macx-ios-clang/features/qt_parts.prf b/mkspecs/features/uikit/qt_parts.prf
index 81814a62b0..81814a62b0 100644
--- a/mkspecs/macx-ios-clang/features/qt_parts.prf
+++ b/mkspecs/features/uikit/qt_parts.prf
diff --git a/mkspecs/features/uikit/resolve_config.prf b/mkspecs/features/uikit/resolve_config.prf
new file mode 100644
index 0000000000..e3c9ae23a9
--- /dev/null
+++ b/mkspecs/features/uikit/resolve_config.prf
@@ -0,0 +1,17 @@
+
+xcodebuild {
+ # Xcode project files always support both Debug and Release configurations
+ # and device and simulator targets, so we make sure the wrapper-makefile
+ # also does.
+ CONFIG += debug_and_release simulator_and_device
+}
+
+load(resolve_config)
+
+!macx-xcode:xcodebuild {
+ # Switch the order to make sure that the first Makefile target is the right one
+ !qtConfig(simulator_and_device):contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \
+ addExclusiveBuildsProper(simulator_and_device, simulator device)
+ else: \
+ addExclusiveBuildsProper(simulator_and_device, device simulator)
+}
diff --git a/mkspecs/macx-ios-clang/features/sdk.prf b/mkspecs/features/uikit/sdk.prf
index f091723774..287441c760 100644
--- a/mkspecs/macx-ios-clang/features/sdk.prf
+++ b/mkspecs/features/uikit/sdk.prf
@@ -1,15 +1,4 @@
-# In case the user sets the SDK manually
-contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*) {
- contains(QT_CONFIG, simulator_and_device): \
- error("iOS simulator is handled automatically for simulator_and_device")
-
- CONFIG += simulator $${simulator.sdk}
-}
-
-build_pass:simulator: \
- QMAKE_MAC_SDK ~= s,^$${device.sdk},$${simulator.sdk},
-
load(sdk)
macx-xcode {
diff --git a/mkspecs/macx-ios-clang/features/testcase.prf b/mkspecs/features/uikit/testcase.prf
index e16c163ffa..e16c163ffa 100644
--- a/mkspecs/macx-ios-clang/features/testcase.prf
+++ b/mkspecs/features/uikit/testcase.prf
diff --git a/mkspecs/macx-ios-clang/features/testcase_targets.prf b/mkspecs/features/uikit/testcase_targets.prf
index e0a2922c3f..e0a2922c3f 100644
--- a/mkspecs/macx-ios-clang/features/testcase_targets.prf
+++ b/mkspecs/features/uikit/testcase_targets.prf
diff --git a/mkspecs/macx-ios-clang/xcodebuild.mk b/mkspecs/features/uikit/xcodebuild.mk
index 0036799b33..0b3ad632b6 100644
--- a/mkspecs/macx-ios-clang/xcodebuild.mk
+++ b/mkspecs/features/uikit/xcodebuild.mk
@@ -40,41 +40,42 @@ $(EXPORT_SUBTARGETS): % : %-build
%-install: ACTION = install
%-install: xcodebuild-% ;
-# iOS Simulator doesn't support archiving
-%-iphonesimulator-install: ACTION = build
-iphonesimulator-install: ACTION = build
+# Simulator doesn't support archiving
+%-simulator-install: ACTION = build
+simulator-install: ACTION = build
# Limit check to a single configuration
-%-iphoneos-check: check-iphoneos ;
-%-iphonesimulator-check: check-iphonesimulator ;
+%-device-check: check-device ;
+%-simulator-check: check-simulator ;
# SDK
-%-iphoneos: SDK = iphoneos
-%-iphonesimulator: SDK = iphonesimulator
+%-device: SDK = $(DEVICE_SDK)
+%-simulator: SDK = $(SIMULATOR_SDK)
# Configuration
release-%: CONFIGURATION = Release
debug-%: CONFIGURATION = Debug
-SPECDIR := $(dir $(lastword $(MAKEFILE_LIST)))
+MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
# Test and build (device) destinations
ifneq ($(filter check%,$(MAKECMDGOALS)),)
ifeq ($(DEVICES),)
$(info Enumerating test destinations (you may override this by setting DEVICES explicitly), please wait...)
- DESTINATIONS_INCLUDE = /tmp/ios_destinations.mk
- $(shell $(SPECDIR)/ios_destinations.sh $(TARGET) > $(DESTINATIONS_INCLUDE))
+ DESTINATIONS_INCLUDE = /tmp/device_destinations.mk
+ $(shell $(MAKEFILE_DIR)device_destinations.sh '$(EXPORT_DEVICE_FILTER)' $(TARGET) > $(DESTINATIONS_INCLUDE))
include $(DESTINATIONS_INCLUDE)
endif
endif
-%-iphonesimulator: DEVICES = $(firstword $(IPHONESIMULATOR_DEVICES))
-%-iphoneos: DEVICES = $(IPHONEOS_DEVICES)
+%-simulator: DEVICES = $(firstword $(SIMULATOR_DEVICES))
+%-device: DEVICES = $(HARDWARE_DEVICES)
-IPHONEOS_GENERIC_DESTINATION := "generic/platform=iOS"
-IPHONESIMULATOR_GENERIC_DESTINATION := "id=$(shell $(SPECDIR)/ios_devices.pl "iPhone|iPad" "NOT unavailable" | tail -n 1)"
+GENERIC_DEVICE_DESTINATION := $(EXPORT_GENERIC_DEVICE_DESTINATION)
+GENERIC_SIMULATOR_DESTINATION := "id=$(shell $(MAKEFILE_DIR)devices.pl '$(EXPORT_DEVICE_FILTER)' "NOT unavailable" | tail -n 1)"
-DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(value $(call toupper,$(call basesdk,$(SDK)))_GENERIC_DESTINATION))
+%-simulator: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_SIMULATOR_DESTINATION))
+%-device: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_DEVICE_DESTINATION))
XCODE_VERSION_MAJOR := $(shell xcodebuild -version | grep Xcode | sed -e 's/Xcode //' | sed -e 's/\..*//')
@@ -89,7 +90,7 @@ DESTINATION_MESSAGE = "Running $(call tolower,$(CONFIGURATION)) $(ACTION) \
xcodebuild-%:
@$(if $(DESTINATION_NAME), echo $(DESTINATION_MESSAGE),)
- xcodebuild $(ACTION) $(XCODEBUILD_FLAGS) -scheme $(TARGET) $(if $(SDK), -sdk $(SDK),) $(if $(CONFIGURATION), -configuration $(CONFIGURATION),) $(if $(DESTINATION), -destination $(DESTINATION) -destination-timeout 1,)
+ xcodebuild $(ACTION) $(XCODEBUILD_FLAGS) -project $(TARGET).xcodeproj -scheme $(TARGET) $(if $(SDK), -sdk $(SDK),) $(if $(CONFIGURATION), -configuration $(CONFIGURATION),) $(if $(DESTINATION), -destination $(DESTINATION) -destination-timeout 1,) $(if $(INSTALL_ROOT), DSTROOT=$(INSTALL_ROOT),)
xcodebuild-check-device_%: DESTINATION_ID=$(lastword $(subst _, ,$@))
diff --git a/mkspecs/macx-ios-clang/features/xcodebuild.prf b/mkspecs/features/uikit/xcodebuild.prf
index b897432a43..df015b583a 100644
--- a/mkspecs/macx-ios-clang/features/xcodebuild.prf
+++ b/mkspecs/features/uikit/xcodebuild.prf
@@ -18,10 +18,14 @@ QMAKE_EXTRA_COMPILERS =
error("Failed to create $$OUT_PWD")
args =
-for(arg, QMAKE_ARGS): \
- args += $$system_quote($$arg)
+prev_arg =
+for(arg, QMAKE_ARGS) {
+ !equals(arg, "-spec"):!equals(prev_arg, "-spec"): \
+ args += $$system_quote($$arg)
+ prev_arg = $$arg
+}
-cmd = "$$QMAKE_QMAKE $$args $$system_quote($$_PRO_FILE_) -spec macx-xcode"
+cmd = "$$QMAKE_QMAKE $$system_quote($$_PRO_FILE_) -spec macx-xcode $$args"
debug(1, "Generating Xcode project in $$OUT_PWD using '$$cmd'")
system("cd $$system_quote($$OUT_PWD) && $$cmd")
@@ -33,7 +37,23 @@ QMAKE_EXTRA_VARIABLES += SUBTARGETS
CONFIG += no_default_goal_deps
-QMAKE_EXTRA_INCLUDES += $$shell_quote($$QMAKESPEC/xcodebuild.mk)
+DEVICE_SDK = $${device.sdk}
+SIMULATOR_SDK = $${simulator.sdk}
+ios {
+ DEVICE_FILTER = "iPhone|iPad"
+ GENERIC_DEVICE_DESTINATION = "generic/platform=iOS"
+}
+tvos {
+ DEVICE_FILTER = "Apple TV"
+ GENERIC_DEVICE_DESTINATION = "generic/platform=tvOS"
+}
+watchos {
+ DEVICE_FILTER = "Apple Watch"
+ GENERIC_DEVICE_DESTINATION = "generic/platform=watchOS"
+}
+QMAKE_EXTRA_VARIABLES += DEVICE_SDK SIMULATOR_SDK DEVICE_FILTER GENERIC_DEVICE_DESTINATION
+
+QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/xcodebuild.mk)
# Distclean
diff --git a/mkspecs/features/unix/opengl.prf b/mkspecs/features/unix/opengl.prf
index 123c647be2..72b5ac453d 100644
--- a/mkspecs/features/unix/opengl.prf
+++ b/mkspecs/features/unix/opengl.prf
@@ -1,4 +1,4 @@
-contains(QT_CONFIG, opengles2) {
+qtConfig(opengles2) {
INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
!isEmpty(QMAKE_LIBDIR_OPENGL_ES2):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2
target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES2
diff --git a/mkspecs/features/unix/openvg.prf b/mkspecs/features/unix/openvg.prf
index 29acec18ff..500dfc50c6 100644
--- a/mkspecs/features/unix/openvg.prf
+++ b/mkspecs/features/unix/openvg.prf
@@ -2,13 +2,13 @@
!isEmpty(QMAKE_LIBDIR_OPENVG): QMAKE_LIBDIR += -L$$QMAKE_LIBDIR_OPENVG
!isEmpty(QMAKE_LIBS_OPENVG): LIBS += $$QMAKE_LIBS_OPENVG
-contains(QT_CONFIG, egl) {
+qtConfig(egl) {
!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
!isEmpty(QMAKE_LIBDIR_EGL): LIBS += -L$$QMAKE_LIBDIR_EGL
!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
}
-contains(QT_CONFIG, openvg_on_opengl) {
+qtConfig(openvg_on_opengl) {
!isEmpty(QMAKE_INCDIR_OPENGL): INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
!isEmpty(QMAKE_LIBDIR_OPENGL): QMAKE_LIBDIR += -L$$QMAKE_LIBDIR_OPENGL
!isEmpty(QMAKE_LIBS_OPENGL): LIBS += $$QMAKE_LIBS_OPENGL
diff --git a/mkspecs/features/win32/console.prf b/mkspecs/features/win32/console.prf
index 629f3af59b..739bb0e01b 100644
--- a/mkspecs/features/win32/console.prf
+++ b/mkspecs/features/win32/console.prf
@@ -1,6 +1,5 @@
CONFIG -= windows
-QMAKE_LFLAGS += $$replace(QMAKE_LFLAGS_CONSOLE, @QMAKE_SUBSYSTEM_SUFFIX@, $$QMAKE_SUBSYSTEM_SUFFIX)
+QMAKE_LFLAGS += $$QMAKE_LFLAGS_CONSOLE
contains(TEMPLATE, ".*app") {
- wince: QMAKE_LFLAGS += /ENTRY:mainACRTStartup
QMAKE_LFLAGS += $$QMAKE_LFLAGS_EXE
}
diff --git a/mkspecs/features/win32/opengl.prf b/mkspecs/features/win32/opengl.prf
index 8173348bc4..ebc29d0923 100644
--- a/mkspecs/features/win32/opengl.prf
+++ b/mkspecs/features/win32/opengl.prf
@@ -1,32 +1,21 @@
-# WinCE does not have a platform directory for .prf files, and the
-# win32 directory is searched for .prfs by qmake on WinCE. Ideally
-# there should be a features/wince/opengl.prf which contains the wince
-# block below.
-
-wince* {
- include(../unix/opengl.prf)
-} else {
- contains(QT_CONFIG, opengles2) {
-# For Desktop, use the ANGLE library location passed on from configure.
- INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
- CONFIG(debug, debug|release) {
- QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_DEBUG
- contains(QT_CONFIG, angle) {
- LIBS += $$QMAKE_LIBS_OPENGL_ES2_DEBUG
- } else {
- LIBS += $$QMAKE_LIBS_OPENGL_ES2
- }
+qtConfig(opengles2) {
+# For Desktop, use the ANGLE library location passed on from configure.
+ INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
+ CONFIG(debug, debug|release) {
+ QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_DEBUG
+ qtConfig(angle) {
+ LIBS += $$QMAKE_LIBS_OPENGL_ES2_DEBUG
} else {
LIBS += $$QMAKE_LIBS_OPENGL_ES2
- QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_RELEASE
}
- DEFINES += QT_OPENGL_ES_2 QT_OPENGL_ES_2_ANGLE
- contains(QT_CONFIG, static): DEFINES += QT_OPENGL_ES_2_ANGLE_STATIC GL_APICALL= EGLAPI=
- QT_CONFIG -= opengl
} else {
- !contains(QT_CONFIG, dynamicgl) {
- QMAKE_LIBS += $$QMAKE_LIBS_OPENGL
- QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL
- }
+ LIBS += $$QMAKE_LIBS_OPENGL_ES2
+ QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_RELEASE
+ }
+ qtConfig(static): DEFINES += GL_APICALL= EGLAPI=
+} else {
+ !qtConfig(dynamicgl) {
+ QMAKE_LIBS += $$QMAKE_LIBS_OPENGL
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL
}
}
diff --git a/mkspecs/features/win32/openvg.prf b/mkspecs/features/win32/openvg.prf
index 0df5b6621a..9d9a49d856 100644
--- a/mkspecs/features/win32/openvg.prf
+++ b/mkspecs/features/win32/openvg.prf
@@ -1,7 +1,7 @@
QMAKE_LIBS += $$QMAKE_LIBS_OPENVG
QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENVG
-contains(QT_CONFIG, openvg_on_opengl) {
+qtConfig(openvg_on_opengl) {
QMAKE_LIBS += $$QMAKE_LIBS_OPENGL
QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL
}
diff --git a/mkspecs/features/win32/qt_config.prf b/mkspecs/features/win32/qt_config.prf
deleted file mode 100644
index 49b4c79431..0000000000
--- a/mkspecs/features/win32/qt_config.prf
+++ /dev/null
@@ -1,10 +0,0 @@
-load(qt_config)
-
-equals(QMAKE_TARGET_OS, xp) {
- # http://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx?PageIndex=3
- equals(QT_ARCH, x86_64) {
- QMAKE_SUBSYSTEM_SUFFIX = ,5.02
- } else {
- QMAKE_SUBSYSTEM_SUFFIX = ,5.01
- }
-}
diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
index 986067fc8c..ecb167bf18 100644
--- a/mkspecs/features/win32/windows.prf
+++ b/mkspecs/features/win32/windows.prf
@@ -1,5 +1,5 @@
CONFIG -= console
-QMAKE_LFLAGS += $$replace(QMAKE_LFLAGS_WINDOWS, @QMAKE_SUBSYSTEM_SUFFIX@, $$QMAKE_SUBSYSTEM_SUFFIX)
+QMAKE_LFLAGS += $$QMAKE_LFLAGS_WINDOWS
contains(TEMPLATE, ".*app") {
QMAKE_LFLAGS += $$QMAKE_LFLAGS_EXE
mingw:DEFINES += QT_NEEDS_QMAIN
diff --git a/mkspecs/features/winrt/default_pre.prf b/mkspecs/features/winrt/default_pre.prf
index 8299950d8b..f397ef3d61 100644
--- a/mkspecs/features/winrt/default_pre.prf
+++ b/mkspecs/features/winrt/default_pre.prf
@@ -1,12 +1,14 @@
*msvc2015 {
- # Note that the order is important, ucrt(d) has to be first
- # Otherwise the linker might use malloc from a different library
- # but free_dbg() from the runtime, causing assert when deleting
- # items from different heaps
+ # Note that the order is important - ucrt(d) has to be first.
+ # Otherwise, the linker might use malloc from a different library,
+ # but free_dbg() from the runtime, causing an assertion failure
+ # due to deleting an item from a different heap.
+ # vcruntime(d) is necessary when we don't link to any libraries
+ # which would pull it in transitively.
CONFIG(debug, debug|release): \
- QMAKE_LIBS = ucrtd.lib $$QMAKE_LIBS
+ QMAKE_LIBS = ucrtd.lib vcruntimed.lib $$QMAKE_LIBS
else: \
- QMAKE_LIBS = ucrt.lib $$QMAKE_LIBS
+ QMAKE_LIBS = ucrt.lib vcruntime.lib $$QMAKE_LIBS
}
equals(TEMPLATE, "vcapp"): CONFIG += windeployqt
diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf
index e17bda3c8e..e7859a7cae 100644
--- a/mkspecs/features/winrt/package_manifest.prf
+++ b/mkspecs/features/winrt/package_manifest.prf
@@ -55,141 +55,145 @@
else: \
manifest_file.output = $$BUILD_DIR/AppxManifest.xml
- # Provide the C-runtime dependency
- equals(TEMPLATE, "app") {
- VCLIBS = Microsoft.VCLibs.$$replace(MSVC_VER, \\., ).00
- winphone: VCLIBS = $${VCLIBS}.Phone
- CONFIG(debug, debug|release): \
- VCLIBS = $${VCLIBS}.Debug
- else: \
- VCLIBS = $${VCLIBS}
- contains(MSVC_VER, "14.0"): VCLIBS = "$${VCLIBS}\" MinVersion=\"14.0.0.0\" Publisher=\"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
- WINRT_MANIFEST.dependencies += $$VCLIBS
- }
+ !contains(WINRT_MANIFEST.CONFIG, "verbatim") {
+ # Provide the C-runtime dependency
+ equals(TEMPLATE, "app") {
+ VCLIBS = Microsoft.VCLibs.$$replace(MSVC_VER, \\., ).00
+ winphone: VCLIBS = $${VCLIBS}.Phone
+ CONFIG(debug, debug|release): \
+ VCLIBS = $${VCLIBS}.Debug
+ else: \
+ VCLIBS = $${VCLIBS}
+ contains(MSVC_VER, "14.0"): VCLIBS = "$${VCLIBS}\" MinVersion=\"14.0.0.0\" Publisher=\"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
+ WINRT_MANIFEST.dependencies += $$VCLIBS
+ }
- # Provide default values for required variables
- isEmpty(WINRT_MANIFEST.target): WINRT_MANIFEST.target = $$TARGET
- isEmpty(WINRT_MANIFEST.identity) {
- # Reuse the existing UUID if possible
- UUID_CACHE = $$OUT_PWD/.qmake.winrt_uuid_$$TARGET
- exists($$UUID_CACHE) {
- include($$UUID_CACHE)
- } else {
- WINRT_UUID = $$system(uuidgen)
- isEmpty(WINRT_UUID): error("Unable to generate a UUID. Make sure uuidgen is in your PATH.")
- WINRT_UUID = "WINRT_MANIFEST.identity = $$WINRT_UUID"
- write_file($$UUID_CACHE, WINRT_UUID)|error("Unable to write the UUID cache; aborting.")
- eval($$WINRT_UUID)
+ # Provide default values for required variables
+ isEmpty(WINRT_MANIFEST.target): WINRT_MANIFEST.target = $$TARGET
+ isEmpty(WINRT_MANIFEST.identity) {
+ # Reuse the existing UUID if possible
+ UUID_CACHE = $$OUT_PWD/.qmake.winrt_uuid_$$TARGET
+ exists($$UUID_CACHE) {
+ include($$UUID_CACHE)
+ } else {
+ WINRT_UUID = $$system(uuidgen)
+ isEmpty(WINRT_UUID): error("Unable to generate a UUID. Make sure uuidgen is in your PATH.")
+ WINRT_UUID = "WINRT_MANIFEST.identity = $$WINRT_UUID"
+ write_file($$UUID_CACHE, WINRT_UUID)|error("Unable to write the UUID cache; aborting.")
+ eval($$WINRT_UUID)
+ }
+ }
+ isEmpty(WINRT_MANIFEST.name): WINRT_MANIFEST.name = $$TARGET
+ isEmpty(WINRT_MANIFEST.architecture): WINRT_MANIFEST.architecture = $$VCPROJ_ARCH
+ isEmpty(WINRT_MANIFEST.version): WINRT_MANIFEST.version = 1.0.0.0
+ isEmpty(WINRT_MANIFEST.publisher): WINRT_MANIFEST.publisher = Default publisher display name
+ isEmpty(WINRT_MANIFEST.publisherid): WINRT_MANIFEST.publisherid = CN=$$(USERNAME)
+ isEmpty(WINRT_MANIFEST.phone_product_id): WINRT_MANIFEST.phone_product_id = $$WINRT_MANIFEST.identity
+ isEmpty(WINRT_MANIFEST.phone_publisher_id): WINRT_MANIFEST.phone_publisher_id = 00000000-0000-0000-0000-000000000000
+ isEmpty(WINRT_MANIFEST.description): WINRT_MANIFEST.description = Default package description
+ 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 {
+ 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
}
- }
- isEmpty(WINRT_MANIFEST.name): WINRT_MANIFEST.name = $$TARGET
- isEmpty(WINRT_MANIFEST.architecture): WINRT_MANIFEST.architecture = $$VCPROJ_ARCH
- isEmpty(WINRT_MANIFEST.version): WINRT_MANIFEST.version = 1.0.0.0
- isEmpty(WINRT_MANIFEST.publisher): WINRT_MANIFEST.publisher = Default publisher display name
- isEmpty(WINRT_MANIFEST.publisherid): WINRT_MANIFEST.publisherid = CN=$$(USERNAME)
- isEmpty(WINRT_MANIFEST.phone_product_id): WINRT_MANIFEST.phone_product_id = $$WINRT_MANIFEST.identity
- isEmpty(WINRT_MANIFEST.phone_publisher_id): WINRT_MANIFEST.phone_publisher_id = 00000000-0000-0000-0000-000000000000
- isEmpty(WINRT_MANIFEST.description): WINRT_MANIFEST.description = Default package description
- 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 {
- 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
- }
- INDENT = "$$escape_expand(\\r\\n) "
+ INDENT = "$$escape_expand(\\r\\n) "
- VS_XML_NAMESPACE = "m2"
- winphone: VS_XML_NAMESPACE = "m3"
- WINRT_MANIFEST.rotation_preference = $$unique(WINRT_MANIFEST.rotation_preference)
- !isEmpty(WINRT_MANIFEST.rotation_preference) {
- MANIFEST_ROTATION += "<$${VS_XML_NAMESPACE}:InitialRotationPreference>"
- for(ROTATION, WINRT_MANIFEST.rotation_preference): \
- MANIFEST_ROTATION += " <$${VS_XML_NAMESPACE}:Rotation Preference=\"$$ROTATION\" />"
- MANIFEST_ROTATION += "</$${VS_XML_NAMESPACE}:InitialRotationPreference>"
+ VS_XML_NAMESPACE = "m2"
+ winphone: VS_XML_NAMESPACE = "m3"
+ WINRT_MANIFEST.rotation_preference = $$unique(WINRT_MANIFEST.rotation_preference)
+ !isEmpty(WINRT_MANIFEST.rotation_preference) {
+ MANIFEST_ROTATION += "<$${VS_XML_NAMESPACE}:InitialRotationPreference>"
+ for(ROTATION, WINRT_MANIFEST.rotation_preference): \
+ MANIFEST_ROTATION += " <$${VS_XML_NAMESPACE}:Rotation Preference=\"$$ROTATION\" />"
+ MANIFEST_ROTATION += "</$${VS_XML_NAMESPACE}:InitialRotationPreference>"
- WINRT_MANIFEST.rotation_preference = $$join(MANIFEST_ROTATION, $$INDENT, $$INDENT)
- }
+ WINRT_MANIFEST.rotation_preference = $$join(MANIFEST_ROTATION, $$INDENT, $$INDENT)
+ }
- INDENT = "$$escape_expand(\\r\\n) "
+ INDENT = "$$escape_expand(\\r\\n) "
- # 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
+ # 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
- contains(WINRT_MANIFEST.capabilities, defaults) {
- WINRT_MANIFEST.capabilities -= defaults
- WINRT_MANIFEST.capabilities += $$WINRT_MANIFEST.capabilities_default
- }
+ contains(WINRT_MANIFEST.capabilities, defaults) {
+ WINRT_MANIFEST.capabilities -= defaults
+ WINRT_MANIFEST.capabilities += $$WINRT_MANIFEST.capabilities_default
+ }
- contains(WINRT_MANIFEST.capabilities_device, defaults) {
- WINRT_MANIFEST.capabilities_device -= defaults
- WINRT_MANIFEST.capabilities_device += $$WINRT_MANIFEST.capabilities_device_default
- }
+ contains(WINRT_MANIFEST.capabilities_device, defaults) {
+ WINRT_MANIFEST.capabilities_device -= defaults
+ WINRT_MANIFEST.capabilities_device += $$WINRT_MANIFEST.capabilities_device_default
+ }
- # Capabilities are given as a string list and may change with the configuration (network, sensors, etc.)
- WINRT_MANIFEST.capabilities = $$unique(WINRT_MANIFEST.capabilities)
- WINRT_MANIFEST.capabilities_device = $$unique(WINRT_MANIFEST.capabilities_device)
- !isEmpty(WINRT_MANIFEST.capabilities)|!isEmpty(WINRT_MANIFEST.capabilities_device) {
- MANIFEST_CAPABILITIES += "<Capabilities>"
- for(CAPABILITY, WINRT_MANIFEST.capabilities): \
- MANIFEST_CAPABILITIES += " <Capability Name=\"$$CAPABILITY\" />"
- for(CAPABILITY, WINRT_MANIFEST.capabilities_device): \
- MANIFEST_CAPABILITIES += " <DeviceCapability Name=\"$$CAPABILITY\" />"
- MANIFEST_CAPABILITIES += "</Capabilities>"
-
- WINRT_MANIFEST.capabilities = $$join(MANIFEST_CAPABILITIES, $$INDENT, $$INDENT)
- }
+ # Capabilities are given as a string list and may change with the configuration (network, sensors, etc.)
+ WINRT_MANIFEST.capabilities = $$unique(WINRT_MANIFEST.capabilities)
+ WINRT_MANIFEST.capabilities_device = $$unique(WINRT_MANIFEST.capabilities_device)
+ !isEmpty(WINRT_MANIFEST.capabilities)|!isEmpty(WINRT_MANIFEST.capabilities_device) {
+ MANIFEST_CAPABILITIES += "<Capabilities>"
+ for(CAPABILITY, WINRT_MANIFEST.capabilities): \
+ MANIFEST_CAPABILITIES += " <Capability Name=\"$$CAPABILITY\" />"
+ for(CAPABILITY, WINRT_MANIFEST.capabilities_device): \
+ MANIFEST_CAPABILITIES += " <DeviceCapability Name=\"$$CAPABILITY\" />"
+ MANIFEST_CAPABILITIES += "</Capabilities>"
+
+ WINRT_MANIFEST.capabilities = $$join(MANIFEST_CAPABILITIES, $$INDENT, $$INDENT)
+ }
- # Dependencies are given as a string list. The CRT dependency is added automatically above.
- # For MSVC2015 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)
- !isEmpty(WINRT_MANIFEST.dependencies) {
- *-msvc2013: MANIFEST_DEPENDENCIES += "<Dependencies>"
- for(DEPENDENCY, WINRT_MANIFEST.dependencies): \
- MANIFEST_DEPENDENCIES += " <PackageDependency Name=\"$$DEPENDENCY\" />"
- *-msvc2013: MANIFEST_DEPENDENCIES += "</Dependencies>"
-
- WINRT_MANIFEST.dependencies = $$join(MANIFEST_DEPENDENCIES, $$INDENT, $$INDENT)
- }
+ # Dependencies are given as a string list. The CRT dependency is added automatically above.
+ # For MSVC2015 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)
+ !isEmpty(WINRT_MANIFEST.dependencies) {
+ *-msvc2013: MANIFEST_DEPENDENCIES += "<Dependencies>"
+ for(DEPENDENCY, WINRT_MANIFEST.dependencies): \
+ MANIFEST_DEPENDENCIES += " <PackageDependency Name=\"$$DEPENDENCY\" />"
+ *-msvc2013: MANIFEST_DEPENDENCIES += "</Dependencies>"
+
+ WINRT_MANIFEST.dependencies = $$join(MANIFEST_DEPENDENCIES, $$INDENT, $$INDENT)
+ }
- # Provide default icons where needed
- isEmpty(WINRT_ASSETS_PATH): WINRT_ASSETS_PATH = $$[QT_HOST_DATA/get]/mkspecs/common/winrt_winphone/assets
- TEMPLATE_CONTENTS = $$cat($$WINRT_MANIFEST, lines)
- ICONS_FOUND = $$find(TEMPLATE_CONTENTS, \\\$\\\$\\{WINRT_MANIFEST\\.(logo|tile)_)
- ICONS_FOUND ~= s/.*\\\$\\\$\\{WINRT_MANIFEST\\.((logo|tile)_[^\}]+)\\}.*/\\1/g
- for (ICON_NAME, ICONS_FOUND) {
- ICON_FILE = $$eval(WINRT_MANIFEST.$$ICON_NAME)
- isEmpty(ICON_FILE) {
- equals(ICON_NAME, "logo_310x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_wide)
- else: equals(ICON_NAME, "logo_150x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_large)
- # Windows Phone specifics
- else: equals(ICON_NAME, "logo_480x800"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash)
- else: equals(ICON_NAME, "logo_71x71"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium)
- else: equals(ICON_NAME, "logo_44x44"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small)
- # Windows RT specifics
- else: equals(ICON_NAME, "logo_620x300"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash)
- else: equals(ICON_NAME, "logo_70x70"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium)
- else: equals(ICON_NAME, "logo_30x30"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small)
+ # Provide default icons where needed
+ isEmpty(WINRT_ASSETS_PATH): WINRT_ASSETS_PATH = $$[QT_HOST_DATA/get]/mkspecs/common/winrt_winphone/assets
+ TEMPLATE_CONTENTS = $$cat($$WINRT_MANIFEST, lines)
+ ICONS_FOUND = $$find(TEMPLATE_CONTENTS, \\\$\\\$\\{WINRT_MANIFEST\\.(logo|tile)_)
+ ICONS_FOUND ~= s/.*\\\$\\\$\\{WINRT_MANIFEST\\.((logo|tile)_[^\}]+)\\}.*/\\1/g
+ for (ICON_NAME, ICONS_FOUND) {
+ ICON_FILE = $$eval(WINRT_MANIFEST.$$ICON_NAME)
+ isEmpty(ICON_FILE) {
+ equals(ICON_NAME, "logo_310x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_wide)
+ else: equals(ICON_NAME, "logo_150x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_large)
+ # Windows Phone specifics
+ else: equals(ICON_NAME, "logo_480x800"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash)
+ else: equals(ICON_NAME, "logo_71x71"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium)
+ else: equals(ICON_NAME, "logo_44x44"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small)
+ # Windows RT specifics
+ else: equals(ICON_NAME, "logo_620x300"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash)
+ else: equals(ICON_NAME, "logo_70x70"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium)
+ else: equals(ICON_NAME, "logo_30x30"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small)
+ }
+ isEmpty(ICON_FILE): ICON_FILE = $$WINRT_ASSETS_PATH/$${ICON_NAME}.png
+ icon_$${ICON_NAME}.input = $$ICON_FILE
+ icon_$${ICON_NAME}.output = $$BUILD_DIR/assets/$$basename(ICON_FILE)
+ icon_$${ICON_NAME}.CONFIG = verbatim
+ QMAKE_SUBSTITUTES += icon_$${ICON_NAME}
+ WINRT_MANIFEST.$${ICON_NAME} = assets/$$basename(ICON_FILE)
}
- isEmpty(ICON_FILE): ICON_FILE = $$WINRT_ASSETS_PATH/$${ICON_NAME}.png
- icon_$${ICON_NAME}.input = $$ICON_FILE
- icon_$${ICON_NAME}.output = $$BUILD_DIR/assets/$$basename(ICON_FILE)
- icon_$${ICON_NAME}.CONFIG = verbatim
- QMAKE_SUBSTITUTES += icon_$${ICON_NAME}
- WINRT_MANIFEST.$${ICON_NAME} = assets/$$basename(ICON_FILE)
- }
- !contains(TEMPLATE, "vc.*") {
- winrt_manifest_install.files = $$manifest_file.output
- winrt_manifest_install.path = $$target.path
- winrt_assets_install.files = $$BUILD_DIR/assets/*
- winrt_assets_install.path = $$target.path/assets
- INSTALLS += winrt_manifest_install winrt_assets_install
+ !contains(TEMPLATE, "vc.*") {
+ winrt_manifest_install.files = $$manifest_file.output
+ winrt_manifest_install.path = $$target.path
+ winrt_assets_install.files = $$BUILD_DIR/assets/*
+ winrt_assets_install.path = $$target.path/assets
+ INSTALLS += winrt_manifest_install winrt_assets_install
+ }
+ } else {
+ manifest_file.CONFIG += verbatim
}
QMAKE_SUBSTITUTES += manifest_file
diff --git a/mkspecs/haiku-g++/qmake.conf b/mkspecs/haiku-g++/qmake.conf
index ac28069864..6a7d080ec3 100644
--- a/mkspecs/haiku-g++/qmake.conf
+++ b/mkspecs/haiku-g++/qmake.conf
@@ -7,9 +7,6 @@ QMAKE_PLATFORM = haiku
include(../common/unix.conf)
-# Choose haiku QPA Plugin as default
-QT_QPA_DEFAULT_PLATFORM = haiku
-
QMAKE_LIBS =
QMAKE_INCDIR =
QMAKE_LIBDIR =
diff --git a/mkspecs/hurd-g++/qmake.conf b/mkspecs/hurd-g++/qmake.conf
index f2e3242627..fc6ef779fc 100644
--- a/mkspecs/hurd-g++/qmake.conf
+++ b/mkspecs/hurd-g++/qmake.conf
@@ -36,10 +36,6 @@ QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
QMAKE_LIBS_OPENVG = -lOpenVG
QMAKE_LIBS_THREAD = -lpthread
-QMAKE_CFLAGS_XCB =
-QMAKE_LIBS_XCB =
-QMAKE_DEFINES_XCB =
-
QMAKE_AR = ar cqs
QMAKE_OBJCOPY = objcopy
QMAKE_NM = nm -P
diff --git a/mkspecs/integrity-armv7-imx6/qmake.conf b/mkspecs/integrity-armv7-imx6/qmake.conf
index 7a1ee461f2..3bf2abd844 100644
--- a/mkspecs/integrity-armv7-imx6/qmake.conf
+++ b/mkspecs/integrity-armv7-imx6/qmake.conf
@@ -4,7 +4,6 @@
include(../common/ghs-integrity-armv7.conf)
-DEFINES += QT_NO_CLIPBOARD
DEFINES += QT_STATICPLUGIN
QTPLUGIN.platforms += qeglfs qeglfs-viv-integration
diff --git a/mkspecs/integrity-armv7/qmake.conf b/mkspecs/integrity-armv7/qmake.conf
index 0cac2ebdc0..7a2ffaba14 100644
--- a/mkspecs/integrity-armv7/qmake.conf
+++ b/mkspecs/integrity-armv7/qmake.conf
@@ -4,7 +4,6 @@
include(../common/ghs-integrity-armv7.conf)
-DEFINES += QT_NO_CLIPBOARD
DEFINES += QT_STATICPLUGIN
QTPLUGIN.platforms += integrityfb
diff --git a/mkspecs/integrity-x86/qmake.conf b/mkspecs/integrity-x86/qmake.conf
index 4a5cfcc49d..13d4a6c082 100644
--- a/mkspecs/integrity-x86/qmake.conf
+++ b/mkspecs/integrity-x86/qmake.conf
@@ -5,7 +5,6 @@
include(../common/ghs-integrity-x86.conf)
QMAKE_CFLAGS += -cpu=Corei
-DEFINES += QT_NO_CLIPBOARD
DEFINES += QT_STATICPLUGIN
QTPLUGIN.platforms += integrityfb
diff --git a/mkspecs/macx-clang-32/qmake.conf b/mkspecs/macx-clang-32/qmake.conf
index f962163c26..ba3c7cab6c 100644
--- a/mkspecs/macx-clang-32/qmake.conf
+++ b/mkspecs/macx-clang-32/qmake.conf
@@ -2,16 +2,12 @@
# qmake configuration for 32-bit Clang on OS X
#
-MAKEFILE_GENERATOR = UNIX
-CONFIG += app_bundle incremental global_init_link_order lib_version_first
-QMAKE_INCREMENTAL_STYLE = sublib
-
include(../common/macx.conf)
include(../common/gcc-base-mac.conf)
include(../common/clang.conf)
include(../common/clang-mac.conf)
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
QMAKE_CFLAGS += -arch i386
QMAKE_CXXFLAGS += -arch i386
diff --git a/mkspecs/macx-clang/qmake.conf b/mkspecs/macx-clang/qmake.conf
index 93a7c8b271..4d56d771a1 100644
--- a/mkspecs/macx-clang/qmake.conf
+++ b/mkspecs/macx-clang/qmake.conf
@@ -2,15 +2,11 @@
# qmake configuration for Clang on OS X
#
-MAKEFILE_GENERATOR = UNIX
-CONFIG += app_bundle incremental global_init_link_order lib_version_first
-QMAKE_INCREMENTAL_STYLE = sublib
-
include(../common/macx.conf)
include(../common/gcc-base-mac.conf)
include(../common/clang.conf)
include(../common/clang-mac.conf)
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
load(qt_config)
diff --git a/mkspecs/macx-g++-32/qmake.conf b/mkspecs/macx-g++-32/qmake.conf
index c0fc8e0007..3cd707d537 100644
--- a/mkspecs/macx-g++-32/qmake.conf
+++ b/mkspecs/macx-g++-32/qmake.conf
@@ -14,7 +14,7 @@ include(../common/macx.conf)
include(../common/gcc-base-mac.conf)
include(../common/g++-macx.conf)
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
QMAKE_CFLAGS += -arch i386
QMAKE_CXXFLAGS += -arch i386
diff --git a/mkspecs/macx-g++/qmake.conf b/mkspecs/macx-g++/qmake.conf
index b0134f72e7..5b3105c668 100644
--- a/mkspecs/macx-g++/qmake.conf
+++ b/mkspecs/macx-g++/qmake.conf
@@ -14,6 +14,6 @@ include(../common/macx.conf)
include(../common/gcc-base-mac.conf)
include(../common/g++-macx.conf)
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
load(qt_config)
diff --git a/mkspecs/macx-g++40/qmake.conf b/mkspecs/macx-g++40/qmake.conf
index 400be1cd8f..308cc2007c 100644
--- a/mkspecs/macx-g++40/qmake.conf
+++ b/mkspecs/macx-g++40/qmake.conf
@@ -14,7 +14,7 @@ include(../common/macx.conf)
include(../common/gcc-base-mac.conf)
include(../common/g++-macx.conf)
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
QMAKE_CC = gcc-4.0
QMAKE_CXX = g++-4.0
diff --git a/mkspecs/macx-g++42/qmake.conf b/mkspecs/macx-g++42/qmake.conf
index 6485124ba6..b24cb7f3f3 100644
--- a/mkspecs/macx-g++42/qmake.conf
+++ b/mkspecs/macx-g++42/qmake.conf
@@ -14,7 +14,7 @@ include(../common/macx.conf)
include(../common/gcc-base-mac.conf)
include(../common/g++-macx.conf)
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
QMAKE_CC = gcc-4.2
QMAKE_CXX = g++-4.2
diff --git a/mkspecs/macx-ios-clang/Info.plist.lib b/mkspecs/macx-ios-clang/Info.plist.lib
index 2a44d1721e..7cbdb9af12 100644
--- a/mkspecs/macx-ios-clang/Info.plist.lib
+++ b/mkspecs/macx-ios-clang/Info.plist.lib
@@ -14,6 +14,8 @@
<string>@TYPEINFO@</string>
<key>CFBundleExecutable</key>
<string>@LIBRARY@</string>
+ <key>CFBundleIdentifier</key>
+ <string>@BUNDLEIDENTIFIER@</string>
<key>NOTE</key>
<string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
</dict>
diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf
deleted file mode 100644
index ec2e2d509c..0000000000
--- a/mkspecs/macx-ios-clang/features/default_post.prf
+++ /dev/null
@@ -1,90 +0,0 @@
-
-equals(TEMPLATE, app):contains(CONFIG, qt) {
- # If the application uses Qt, it needs to be an application bundle
- # to be able to deploy and run on iOS. The only exception to this
- # is if you're working with a jailbroken device and can run the
- # resulting binary from the console/over SSH, but that's not a
- # use-case we care about, so no need to complicate the logic.
- CONFIG *= app_bundle
-
- # For Qt applications we want Xcode project files as the generated output,
- # but since qmake doesn't handle the transition between makefiles and Xcode
- # project files (which happens when using subdirs), we can't just override
- # MAKEFILE_GENERATOR. Instead, we generate the Xcode project by spawning a
- # child qmake process with -spec macx-xcode and let the top level qmake
- # process generate a wrapper makefile that forwards everything to xcodebuild.
- equals(MAKEFILE_GENERATOR, UNIX): \
- CONFIG = xcodebuild $$CONFIG
-}
-
-load(default_post)
-
-macx-xcode {
- ios_device_family.name = TARGETED_DEVICE_FAMILY
- ios_device_family.value = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY
- QMAKE_MAC_XCODE_SETTINGS += ios_device_family
-
- # Set up default 4-inch iPhone/iPod launch image so that our apps
- # support the full screen resolution of those devices.
- qmake_launch_image = Default-568h@2x.png
- qmake_copy_image.input = $$QMAKESPEC/$$qmake_launch_image
- qmake_copy_image.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$qmake_launch_image
- qmake_copy_image.CONFIG = verbatim
- QMAKE_SUBSTITUTES += qmake_copy_image
- qmake_launch_images.files = $$qmake_copy_image.output
- QMAKE_BUNDLE_DATA += qmake_launch_images
-
- lessThan(QMAKE_XCODE_VERSION, "6.0") {
- warning("You need to update Xcode to version 6 or newer to fully support iPhone6/6+")
- } else {
- # Set up default LaunchScreen to support iPhone6/6+
- qmake_launch_screen = LaunchScreen.xib
- qmake_copy_launch_screen.input = $$QMAKESPEC/$$qmake_launch_screen
- qmake_copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$qmake_launch_screen
- QMAKE_SUBSTITUTES += qmake_copy_launch_screen
- qmake_launch_screens.files = $$qmake_copy_launch_screen.output
- QMAKE_BUNDLE_DATA += qmake_launch_screens
- }
-}
-
-macx-xcode {
- arch_device.name = "ARCHS[sdk=$${device.sdk}*]"
- arch_device.value = $$QMAKE_IOS_DEVICE_ARCHS
- arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]"
- arch_simulator.value = $$QMAKE_IOS_SIMULATOR_ARCHS
-
- QMAKE_MAC_XCODE_SETTINGS += arch_device arch_simulator
- QMAKE_XCODE_ARCHS = $$QMAKE_IOS_DEVICE_ARCHS $$QMAKE_IOS_SIMULATOR_ARCHS
-
- only_active_arch.name = ONLY_ACTIVE_ARCH
- only_active_arch.value = YES
- 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.*): \
- VALID_ARCHS = $$QMAKE_IOS_DEVICE_ARCHS
- else: \
- VALID_ARCHS = $$QMAKE_IOS_SIMULATOR_ARCHS
-
- single_arch: VALID_ARCHS = $$first(VALID_ARCHS)
-
- ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS))
- ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch))
-
- QMAKE_EXTRA_VARIABLES += VALID_ARCHS ACTIVE_ARCHS ARCH_ARGS
-
- arch_flags = $(EXPORT_ARCH_ARGS)
-
- QMAKE_CFLAGS += $$arch_flags
- QMAKE_CXXFLAGS += $$arch_flags
- QMAKE_LFLAGS += $$arch_flags
-}
-
-!xcodebuild:equals(TEMPLATE, app):!isEmpty(QMAKE_INFO_PLIST) {
- # Only link in photo library support if Info.plist contains
- # NSPhotoLibraryUsageDescription. Otherwise it will be rejected from AppStore.
- plist_path = $$absolute_path($$QMAKE_INFO_PLIST, $$_PRO_FILE_PWD_)
- system("/usr/libexec/PlistBuddy -c 'Print NSPhotoLibraryUsageDescription' $$system_quote($$plist_path) &>/dev/null"): \
- QTPLUGIN += qiosnsphotolibrarysupport
-}
diff --git a/mkspecs/macx-ios-clang/features/default_pre.prf b/mkspecs/macx-ios-clang/features/default_pre.prf
deleted file mode 100644
index 977ac9acb2..0000000000
--- a/mkspecs/macx-ios-clang/features/default_pre.prf
+++ /dev/null
@@ -1,21 +0,0 @@
-
-load(default_pre)
-
-# In case Qt was built for a specific SDK
-!contains(QT_CONFIG, simulator_and_device):contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \
- CONFIG += simulator $${simulator.sdk}
-
-# 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 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
-}
diff --git a/mkspecs/macx-ios-clang/features/resolve_config.prf b/mkspecs/macx-ios-clang/features/resolve_config.prf
deleted file mode 100644
index 22d962af38..0000000000
--- a/mkspecs/macx-ios-clang/features/resolve_config.prf
+++ /dev/null
@@ -1,72 +0,0 @@
-
-xcodebuild {
- # Xcode project files always support both Debug and Release configurations
- # and iOS 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 {
- # Switch the order to make sure that the first Makefile target is the right one
- !contains(QT_CONFIG, simulator_and_device):contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \
- addExclusiveBuildsProper(simulator_and_device, simulator device)
- else: \
- addExclusiveBuildsProper(simulator_and_device, device simulator)
-}
-
-equals(TEMPLATE, subdirs) {
- # Prevent recursion into host_builds
- for(subdir, SUBDIRS) {
- contains($${subdir}.CONFIG, host_build) {
- $${subdir}.CONFIG += no_$${simulator.target}_target no_$${device.target}_target
-
- # Other targets which we do want to recurse into may depend on this target,
- # for example corelib depends on moc, rcc, bootstrap, etc, and other libs
- # may depend on host-tools that are needed to build the lib, so we resolve
- # the final target name and redirect it to the base target, so that the
- # dependency chain is not broken for the other targets.
-
- !isEmpty($${subdir}.target) {
- target = $$eval($${subdir}.target)
- } else {
- !isEmpty($${subdir}.file): \
- file = $$eval($${subdir}.file)
- else: !isEmpty($${subdir}.subdir): \
- file = $$eval($${subdir}.subdir)
- else: \
- file = $$subdir
-
- target = sub-$$file
- }
-
- target ~= s,[^a-zA-Z0-9_],-,
-
- $${target}-$${simulator.target}.depends = $$target
- $${target}-$${device.target}.depends = $$target
- QMAKE_EXTRA_TARGETS += $${target}-$${simulator.target} $${target}-$${device.target}
- }
- }
-}
diff --git a/mkspecs/macx-ios-clang/qmake.conf b/mkspecs/macx-ios-clang/qmake.conf
index 9b145c2b03..e21445deb7 100644
--- a/mkspecs/macx-ios-clang/qmake.conf
+++ b/mkspecs/macx-ios-clang/qmake.conf
@@ -2,21 +2,13 @@
# qmake configuration for macx-ios-clang
#
-MAKEFILE_GENERATOR = UNIX
-CONFIG += app_bundle reduce_exports incremental global_init_link_order lib_version_first sdk
-QMAKE_INCREMENTAL_STYLE = sublib
-
-QMAKE_MACOSX_DEPLOYMENT_TARGET =
-QMAKE_IOS_DEPLOYMENT_TARGET = 6.0
-
-INCLUDEPATH += $$PWD/ios
-DEFINES += DARWIN_NO_CARBON QT_NO_PRINTER QT_NO_PRINTDIALOG
+QMAKE_IOS_DEPLOYMENT_TARGET = 7.0
# Universal target (iPhone and iPad)
-QMAKE_IOS_TARGETED_DEVICE_FAMILY = 1,2
+QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 1,2
-QMAKE_IOS_DEVICE_ARCHS = armv7 arm64
-QMAKE_IOS_SIMULATOR_ARCHS = i386 x86_64
+QMAKE_APPLE_DEVICE_ARCHS = armv7 arm64
+QMAKE_APPLE_SIMULATOR_ARCHS = i386 x86_64
include(../common/ios.conf)
include(../common/gcc-base-mac.conf)
diff --git a/mkspecs/macx-llvm/qmake.conf b/mkspecs/macx-llvm/qmake.conf
index 1c90cdf273..0434d29b50 100644
--- a/mkspecs/macx-llvm/qmake.conf
+++ b/mkspecs/macx-llvm/qmake.conf
@@ -14,7 +14,7 @@ include(../common/macx.conf)
include(../common/gcc-base-mac.conf)
include(../common/llvm.conf)
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvmgcc42
diff --git a/mkspecs/macx-tvos-clang/Info.plist.app b/mkspecs/macx-tvos-clang/Info.plist.app
new file mode 100644
index 0000000000..618989d63d
--- /dev/null
+++ b/mkspecs/macx-tvos-clang/Info.plist.app
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@EXECUTABLE@</string>
+ <key>CFBundleIdentifier</key>
+ <string>@BUNDLEIDENTIFIER@</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>CFBundleIcons</key>
+ <dict>
+ <key>CFBundlePrimaryIcon</key>
+ <string>App Icon - Small</string>
+ </dict>
+ <key>CFBundleSupportedPlatforms</key>
+ <array>
+ <string>AppleTVOS</string>
+ </array>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>MinimumOSVersion</key>
+ <string>9.1</string>
+ <key>NOTE</key>
+ <string>This file was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-tvos-clang/Info.plist.lib b/mkspecs/macx-tvos-clang/Info.plist.lib
new file mode 100644
index 0000000000..7cbdb9af12
--- /dev/null
+++ b/mkspecs/macx-tvos-clang/Info.plist.lib
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@SHORT_VERSION@</string>
+ <key>CFBundleVersion</key>
+ <string>@FULL_VERSION@</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@LIBRARY@</string>
+ <key>CFBundleIdentifier</key>
+ <string>@BUNDLEIDENTIFIER@</string>
+ <key>NOTE</key>
+ <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-tvos-clang/qmake.conf b/mkspecs/macx-tvos-clang/qmake.conf
new file mode 100644
index 0000000000..e945cc9d28
--- /dev/null
+++ b/mkspecs/macx-tvos-clang/qmake.conf
@@ -0,0 +1,21 @@
+#
+# qmake configuration for macx-tvos-clang
+#
+
+QMAKE_TVOS_DEPLOYMENT_TARGET = 9.1
+
+INCLUDEPATH += $$PWD/tvos
+
+QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 3
+
+QMAKE_APPLE_DEVICE_ARCHS = arm64
+QMAKE_APPLE_SIMULATOR_ARCHS = x86_64
+
+include(../common/tvos.conf)
+include(../common/gcc-base-mac.conf)
+include(../common/clang.conf)
+include(../common/clang-mac.conf)
+include(../common/ios/clang.conf)
+include(../common/ios/qmake.conf)
+
+load(qt_config)
diff --git a/mkspecs/macx-tvos-clang/qplatformdefs.h b/mkspecs/macx-tvos-clang/qplatformdefs.h
new file mode 100644
index 0000000000..68020de6d5
--- /dev/null
+++ b/mkspecs/macx-tvos-clang/qplatformdefs.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 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 "../common/mac/qplatformdefs.h"
diff --git a/mkspecs/macx-watchos-clang/Info.plist.app b/mkspecs/macx-watchos-clang/Info.plist.app
new file mode 100644
index 0000000000..cceb9c5b5a
--- /dev/null
+++ b/mkspecs/macx-watchos-clang/Info.plist.app
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@EXECUTABLE@</string>
+ <key>CFBundleIdentifier</key>
+ <string>@BUNDLEIDENTIFIER@</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ </array>
+ <key>WKWatchKitApp</key>
+ <true/>
+ <key>NOTE</key>
+ <string>This file was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-watchos-clang/Info.plist.lib b/mkspecs/macx-watchos-clang/Info.plist.lib
new file mode 100644
index 0000000000..7cbdb9af12
--- /dev/null
+++ b/mkspecs/macx-watchos-clang/Info.plist.lib
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleShortVersionString</key>
+ <string>@SHORT_VERSION@</string>
+ <key>CFBundleVersion</key>
+ <string>@FULL_VERSION@</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Created by Qt/QMake</string>
+ <key>CFBundleSignature</key>
+ <string>@TYPEINFO@</string>
+ <key>CFBundleExecutable</key>
+ <string>@LIBRARY@</string>
+ <key>CFBundleIdentifier</key>
+ <string>@BUNDLEIDENTIFIER@</string>
+ <key>NOTE</key>
+ <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
+</dict>
+</plist>
diff --git a/mkspecs/macx-watchos-clang/qmake.conf b/mkspecs/macx-watchos-clang/qmake.conf
new file mode 100644
index 0000000000..03c05ad717
--- /dev/null
+++ b/mkspecs/macx-watchos-clang/qmake.conf
@@ -0,0 +1,21 @@
+#
+# qmake configuration for macx-watchos-clang
+#
+
+QMAKE_WATCHOS_DEPLOYMENT_TARGET = 2.2
+
+INCLUDEPATH += $$PWD/watchos
+
+QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 4
+
+QMAKE_APPLE_DEVICE_ARCHS = armv7k
+QMAKE_APPLE_SIMULATOR_ARCHS = i386
+
+include(../common/watchos.conf)
+include(../common/gcc-base-mac.conf)
+include(../common/clang.conf)
+include(../common/clang-mac.conf)
+include(../common/ios/clang.conf)
+include(../common/ios/qmake.conf)
+
+load(qt_config)
diff --git a/mkspecs/macx-watchos-clang/qplatformdefs.h b/mkspecs/macx-watchos-clang/qplatformdefs.h
new file mode 100644
index 0000000000..965eb5e97b
--- /dev/null
+++ b/mkspecs/macx-watchos-clang/qplatformdefs.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+**
+** 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 "../common/mac/qplatformdefs.h"
diff --git a/mkspecs/qnx-aarch64le-qcc/qmake.conf b/mkspecs/qnx-aarch64le-qcc/qmake.conf
index 8e229d360b..5e3123bece 100644
--- a/mkspecs/qnx-aarch64le-qcc/qmake.conf
+++ b/mkspecs/qnx-aarch64le-qcc/qmake.conf
@@ -2,13 +2,13 @@
# qmake configuration for qnx aarch64le systems
#
-DEFINES += QT_NO_CLIPBOARD _FORTIFY_SOURCE=2
+DEFINES += _FORTIFY_SOURCE=2
QMAKE_LFLAGS_SHLIB += -Wl,-z,relro -Wl,-z,now
include(../common/qcc-base-qnx-aarch64le.conf)
-contains(QT_CONFIG, stack-protector-strong) {
+qtConfig(stack-protector-strong) {
QMAKE_CFLAGS += -fstack-protector-strong
QMAKE_CXXFLAGS += -fstack-protector-strong
} else {
diff --git a/mkspecs/qnx-armle-v7-qcc/qmake.conf b/mkspecs/qnx-armle-v7-qcc/qmake.conf
index b77455044c..a21e5bcad3 100644
--- a/mkspecs/qnx-armle-v7-qcc/qmake.conf
+++ b/mkspecs/qnx-armle-v7-qcc/qmake.conf
@@ -3,5 +3,3 @@
#
include(../common/qcc-base-qnx-armle-v7.conf)
-
-DEFINES += QT_NO_CLIPBOARD
diff --git a/mkspecs/qnx-x86-64-qcc/qmake.conf b/mkspecs/qnx-x86-64-qcc/qmake.conf
index f1760e4072..2a01ed1405 100644
--- a/mkspecs/qnx-x86-64-qcc/qmake.conf
+++ b/mkspecs/qnx-x86-64-qcc/qmake.conf
@@ -2,13 +2,11 @@
# qmake configuration for qnx x86-64 systems
#
-DEFINES += QT_NO_CLIPBOARD
-
QMAKE_LFLAGS_SHLIB += -Wl,-z,relro -Wl,-z,now
include(../common/qcc-base-qnx-x86-64.conf)
-contains(QT_CONFIG, stack-protector-strong) {
+qtConfig(stack-protector-strong) {
QMAKE_CFLAGS += -fstack-protector-strong
QMAKE_CXXFLAGS += -fstack-protector-strong
} else {
diff --git a/mkspecs/qnx-x86-qcc/qmake.conf b/mkspecs/qnx-x86-qcc/qmake.conf
index 36a3ba2ff3..3daadf4f02 100644
--- a/mkspecs/qnx-x86-qcc/qmake.conf
+++ b/mkspecs/qnx-x86-qcc/qmake.conf
@@ -3,5 +3,3 @@
#
include(../common/qcc-base-qnx-x86.conf)
-
-DEFINES += QT_NO_CLIPBOARD
diff --git a/mkspecs/wince60standard-armv4i-msvc2005/qmake.conf b/mkspecs/wince60standard-armv4i-msvc2005/qmake.conf
deleted file mode 100644
index fb16348487..0000000000
--- a/mkspecs/wince60standard-armv4i-msvc2005/qmake.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# qmake configuration for wince-msvc2005
-#
-# Written for Microsoft VS 2005 for WindowsCE 6.0 (ARMV4I)
-# This is just a template for creating Windows CE 6 mkspecs.
-#
-
-include(../common/wince/qmake.conf)
-
-CE_SDK = STANDARDSDK_600 # replace with actual SDK name
-CE_ARCH = ARMV4I
-
-DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x600 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM _WIN32 __arm__
-
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:THUMB
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:THUMB
-QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:THUMB /DLL /SAFESEH:NO
-QMAKE_LIBFLAGS_RELEASE = /LTCG
-QMAKE_LIBS = corelibc.lib coredll.lib
-QMAKE_LIBS_CORE = libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib
-QMAKE_LIBS_GUI = ceshell.lib ole32.lib $$QMAKE_LIBS_CORE
-QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
-QMAKE_LIBS_OPENGL =
-QMAKE_LIBS_COMPAT =
-
-QMAKE_RC = rc /DUNDER_CE=600 /D_WIN32_WCE=0x600
-
diff --git a/mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h b/mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h
deleted file mode 100644
index 780b7ef124..0000000000
--- a/mkspecs/wince60standard-armv4i-msvc2005/qplatformdefs.h
+++ /dev/null
@@ -1,41 +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 "../common/wince/qplatformdefs.h"
-
diff --git a/mkspecs/wince60standard-x86-msvc2005/qmake.conf b/mkspecs/wince60standard-x86-msvc2005/qmake.conf
deleted file mode 100644
index 417de0d688..0000000000
--- a/mkspecs/wince60standard-x86-msvc2005/qmake.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# qmake configuration for wince-msvc2005
-#
-# Written for Microsoft VS 2005 for WindowsCE 6.0 (x86)
-# This is just a template for creating Windows CE 6 mkspecs.
-#
-
-include(../common/wince/qmake.conf)
-
-CE_SDK = STANDARDSDK_600 # replace with actual SDK name
-CE_ARCH = x86
-
-DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x600 $$CE_ARCH _X86_ _M_IX86
-
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:X86
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:X86
-QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:X86 /DLL /SAFESEH:NO
-QMAKE_LIBFLAGS_RELEASE = /LTCG
-QMAKE_LIBS = corelibc.lib coredll.lib
-QMAKE_LIBS_CORE = corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib
-QMAKE_LIBS_GUI = ceshell.lib ole32.lib $$QMAKE_LIBS_CORE
-QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
-QMAKE_LIBS_OPENGL =
-QMAKE_LIBS_COMPAT =
-
-QMAKE_RC = rc /DUNDER_CE=600 /D_WIN32_WCE=0x600
-
diff --git a/mkspecs/wince60standard-x86-msvc2005/qplatformdefs.h b/mkspecs/wince60standard-x86-msvc2005/qplatformdefs.h
deleted file mode 100644
index 780b7ef124..0000000000
--- a/mkspecs/wince60standard-x86-msvc2005/qplatformdefs.h
+++ /dev/null
@@ -1,41 +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 "../common/wince/qplatformdefs.h"
-
diff --git a/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf b/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf
deleted file mode 100644
index 860fbc0e6a..0000000000
--- a/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf
+++ /dev/null
@@ -1,29 +0,0 @@
-# qmake configuration for Windows Embedded Compact 7 with VS2008 on ARM targets
-#
-# This is just a template for creating WEC7 mkspecs for ARM targets
-# Replace the SDK name with actual SDK name.
-
-include(../common/wince/qmake.conf)
-
-CE_SDK = WEC7_SDK_NAME # replace with actual SDK name
-CE_ARCH = armv4i
-
-DEFINES += QT_NO_CLIPBOARD QT_NO_ACCESSIBILITY QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _AMRV7_ armv7 _ARM_
-
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB
-QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB /DLL /SAFESEH:NO
-QMAKE_LIBFLAGS_RELEASE = /LTCG
-QMAKE_LIBS = corelibc.lib coredll.lib
-QMAKE_LIBS_CORE = corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib
-QMAKE_LIBS_GUI = ceshell.lib ole32.lib $$QMAKE_LIBS_CORE
-QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
-QMAKE_LIBS_OPENGL =
-QMAKE_LIBS_COMPAT =
-QMAKE_LIBS_OPENVG = libopenvg.lib
-QMAKE_LIBS_OPENGL_ES2 = $${LIBEGL_NAME}.lib $${LIBGLESV2_NAME}.lib
-
-QMAKE_RC = rc
-
-QMAKE_COMPILER_DEFINES -= _MSC_VER=1400
-QMAKE_COMPILER_DEFINES += _MSC_VER=1500
diff --git a/mkspecs/wince70embedded-armv4i-msvc2008/qplatformdefs.h b/mkspecs/wince70embedded-armv4i-msvc2008/qplatformdefs.h
deleted file mode 100644
index 780b7ef124..0000000000
--- a/mkspecs/wince70embedded-armv4i-msvc2008/qplatformdefs.h
+++ /dev/null
@@ -1,41 +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 "../common/wince/qplatformdefs.h"
-
diff --git a/mkspecs/wince70embedded-x86-msvc2008/qmake.conf b/mkspecs/wince70embedded-x86-msvc2008/qmake.conf
deleted file mode 100644
index 4d995db332..0000000000
--- a/mkspecs/wince70embedded-x86-msvc2008/qmake.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-# qmake configuration for Windows Embedded Compact 7 with VS2008 platform builder target
-#
-#
-
-include(../common/wince/qmake.conf)
-
-CE_SDK = Platform Builder
-CE_ARCH = _TGTCPU
-
-DEFINES += QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _X86_ _M_IX86
-
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:X86
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:X86
-QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:X86 /DLL /SAFESEH:NO
-QMAKE_LIBFLAGS_RELEASE = /LTCG
-QMAKE_LIBS = corelibc.lib coredll.lib
-QMAKE_LIBS_CORE = corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib
-QMAKE_LIBS_GUI = ceshell.lib ole32.lib $$QMAKE_LIBS_CORE
-QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
-QMAKE_LIBS_OPENGL =
-QMAKE_LIBS_COMPAT =
-QMAKE_LIBS_OPENVG = libopenvg.lib
-
-QMAKE_RC = rc
-
-QMAKE_COMPILER_DEFINES -= _MSC_VER=1400
-QMAKE_COMPILER_DEFINES += _MSC_VER=1500
diff --git a/mkspecs/wince80colibri-armv7-msvc2012/qmake.conf b/mkspecs/wince80colibri-armv7-msvc2012/qmake.conf
deleted file mode 100644
index 7af1ca828e..0000000000
--- a/mkspecs/wince80colibri-armv7-msvc2012/qmake.conf
+++ /dev/null
@@ -1,45 +0,0 @@
-# qmake configuration for Windows Embedded Compact 2013 with VS2012 on ARM targets
-#
-# This is just a template for creating WEC2013 mkspecs for ARM targets
-# Replace the SDK name with actual SDK name.
-
-include(../common/wince/qmake.conf)
-
-CE_SDK = Toradex_CE800 # replace with actual SDK name
-CE_ARCH = ARMV7
-CE_PLATFORMNAME = Toradex_CE800
-QT_CONFIG -= accessibility
-
-DEFINES += QT_NO_CLIPBOARD QT_NO_ACCESSIBILITY QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x800 $$CE_ARCH _AMRV7_ armv7 _ARM_ UNDER_CE WINCE ARM QT_NO_WINCE_SHELLSDK QT_NO_WINCE_NUIOUSER
-
-#QMAKE_CXXFLAGS += /P
-QMAKE_CFLAGS_RELEASE += -O2 -MT
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi
-QMAKE_CFLAGS_DEBUG += -Zi -MTd
-QMAKE_CFLAGS_RELEASE -= -MD
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -MD
-QMAKE_CFLAGS_DEBUG -= -MDd
-QMAKE_CXXFLAGS_RELEASE -= -MD
-QMAKE_CXXFLAGS_RELEASE += -MT
-QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -MT
-QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -MD
-QMAKE_CXXFLAGS_DEBUG -= -MDd
-QMAKE_CXXFLAGS_DEBUG += -MTd
-QMAKE_INCDIR_OPENGL_ES2 += $$(NV_WINCE_T2_PLAT)/include
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,8.00 /MACHINE:ARM
-QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,8.00 /MACHINE:ARM
-QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,8.00 /MACHINE:ARM /DLL /SAFESEH:NO
-QMAKE_LIBFLAGS_RELEASE = /LTCG
-QMAKE_LIBS = coredll.lib
-QMAKE_LIBS_CORE = ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib
-QMAKE_LIBS_GUI = ole32.lib $$QMAKE_LIBS_CORE
-QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
-QMAKE_LIBS_OPENGL_ES2 = $${LIBEGL_NAME}.lib $${LIBGLESV2_NAME}.lib
-
-MAKEFILE_GENERATOR = MSBUILD
-VCPROJ_EXTENSION = .vcxproj
-
-QMAKE_RC = rc
-
-QMAKE_COMPILER_DEFINES -= _MSC_VER=1400
-QMAKE_COMPILER_DEFINES += _MSC_VER=1700
diff --git a/mkspecs/wince80colibri-armv7-msvc2012/qplatformdefs.h b/mkspecs/wince80colibri-armv7-msvc2012/qplatformdefs.h
deleted file mode 100644
index 780b7ef124..0000000000
--- a/mkspecs/wince80colibri-armv7-msvc2012/qplatformdefs.h
+++ /dev/null
@@ -1,41 +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 "../common/wince/qplatformdefs.h"
-