From 31f0728ac9cc4d49b93742fbe8e948c45c992b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?= Date: Fri, 16 Dec 2016 16:20:40 -0300 Subject: Mark QPA symbols as private QPA headers are shipped as private symbols, so they should be marked as such. This helps distros to check which applications/libraries need recompiling on each Qt patch update. Task-number: QTBUG-57060 Change-Id: Ie09d4d10e1edb5127d45a05a3dfa3f4c9dd012f2 Reviewed-by: Dmitry Shachnev Reviewed-by: Thiago Macieira Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qt_module.prf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 31d628596c..f6cbf99c05 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -206,7 +206,10 @@ android: CONFIG += qt_android_deps no_linker_version_script } else { verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API {" \ " qt_private_api_tag*;" - for(header, SYNCQT.PRIVATE_HEADER_FILES): \ + + private_api_headers = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.QPA_HEADER_FILES + + for(header, private_api_headers): \ verscript_content += " @FILE:$${_PRO_FILE_PWD_}/$$header@" verscript_content += "};" @@ -227,7 +230,7 @@ android: CONFIG += qt_android_deps no_linker_version_script verscriptprocess.name = linker version script ${QMAKE_FILE_BASE} verscriptprocess.input = verscript_in verscriptprocess.CONFIG += no_link target_predeps - for(header, SYNCQT.PRIVATE_HEADER_FILES): \ + for(header, private_api_headers): \ verscriptprocess.depends += $${_PRO_FILE_PWD_}/$$header verscriptprocess.output = $$verscript verscriptprocess.commands = perl $${PWD}/data/unix/findclasslist.pl < ${QMAKE_FILE_IN} > $@ -- cgit v1.2.3 From fe2f8146d43c769392953cf55014e53510a0ce2b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 6 Dec 2016 18:49:53 +0100 Subject: prune vestiges of DEPLOYMENT_PLUGIN the code was broken since 5.0, as it still hardcoded the version number 4 for the plugin basenames. wince is not supported any more, so there is no point in trying to restore the code to function. at a later point, we'll make QTPLUGIN universal enough to cover both static and dynamic deployment. Change-Id: I0911ce4aff7a799dd471d6218e046f13dca6d49e Reviewed-by: Jake Petroules Reviewed-by: Joerg Bornemann Reviewed-by: Andy Shaw --- mkspecs/features/qt.prf | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 98f794c485..28a2104f28 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -315,9 +315,7 @@ contains(TEMPLATE, .*app) { QTPLUGIN = $$manualplugs $$autoplugs } -QT_PLUGIN_VERIFY = DEPLOYMENT_PLUGIN qtConfig(static) { - QT_PLUGIN_VERIFY += QTPLUGIN force_import_plugins|contains(TEMPLATE, .*app) { import_plugins:!isEmpty(QTPLUGIN) { IMPORT_FILE_CONT = \ @@ -337,10 +335,8 @@ qtConfig(static) { QMAKE_DISTCLEAN += $$IMPORT_CPP } } -} -for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) { - for(QTPLUG, $$list($$lower($$unique($$QT_CURRENT_VERIFY)))) { + for (QTPLUG, $$list($$lower($$unique(QTPLUGIN)))) { # Check if the plugin is known to Qt. We can use this to determine # the plugin path. Unknown plugins must rely on the default link path. QT_PLUGINPATH = $$eval(QT_PLUGIN.$${QTPLUG}.TYPE) @@ -349,7 +345,7 @@ for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) { QT_LINKAGE = -l$${QTPLUG}$$qtPlatformTargetSuffix() # Only link against plugin in static builds - isEqual(QT_CURRENT_VERIFY, QTPLUGIN) { + { !isEmpty(QT_PLUGINPATH) { plugpath = $$eval(QT_PLUGIN.$${QTPLUG}.PATH) isEmpty(plugpath): \ @@ -357,21 +353,6 @@ for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) { LIBS *= -L$$plugpath/$$QT_PLUGINPATH } LIBS += $$QT_LINKAGE - # if the plugin is linked statically there is no need to deploy it - DEPLOYMENT_PLUGIN -= $$QT_CURRENT_VERIFY - } - - # The following block is currently broken, because qt_plugin_XXX.prf files - # are not generated for dynamic builds. - false:isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:winrt { - QT_ITEM = - debug: QT_ITEM = $${QTPLUG}d4.dll - else: QT_ITEM = $${QTPLUG}4.dll - - qt_additional_plugin_$${QTPLUG}.files = $$[QT_INSTALL_PLUGINS/get]/$${QT_PLUGINPATH}/$${QT_ITEM} - qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH} - - INSTALLS *= qt_additional_plugin_$${QTPLUG} } } } -- cgit v1.2.3 From d0db09681fc12082d717f3af88175775e0fa18fb Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 20 Dec 2016 19:35:19 +0100 Subject: prune obsolete qml file deployment static builds of qt have been embedding their qml files via the qt resource system since qt 5.7, so the code which attempted to deploy them into mac bundles (introduced in qt 5.2) is useless nowadays. Change-Id: I830cd2b660f7cab42a46ec8e002a42d9d299b528 Reviewed-by: Jake Petroules Reviewed-by: Joerg Bornemann --- mkspecs/features/qt.prf | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 28a2104f28..bfa6c7988d 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -238,40 +238,6 @@ contains(qt_module_deps, qml): \ write_file($$QML_IMPORT_CPP, IMPORT_FILE_CONT)|error() GENERATED_SOURCES += $$QML_IMPORT_CPP QMAKE_DISTCLEAN += $$QML_IMPORT_CPP - - # copy qml files. this part is platform spesific. - mac { - osx { - # Note: user can override QMAKE_BUNDLE_QML from pro file to change target bundle path - isEmpty(QMAKE_QML_BUNDLE_PATH):QMAKE_QML_BUNDLE_PATH = "Resources/qt_qml" - qmlTargetPath = $$OUT_PWD/$${TARGET}.app/Contents/$$QMAKE_QML_BUNDLE_PATH - qtconfTargetPath = $$OUT_PWD/$${TARGET}.app/Contents/Resources/qt.conf - } else { - # iOS: flat bundle layout (no Contents/Resources) - isEmpty(QMAKE_QML_BUNDLE_PATH):QMAKE_QML_BUNDLE_PATH = "qt_qml" - qmlTargetPath = $CODESIGNING_FOLDER_PATH/$$QMAKE_QML_BUNDLE_PATH - qtconfTargetPath = $CODESIGNING_FOLDER_PATH/qt.conf - } - - # set import path in qt.conf to point to the bundeled qml: - QT_CONF_CONTENTS = \ - "[Paths]" \ - "Imports = $$QMAKE_QML_BUNDLE_PATH" \ - "Qml2Imports = $$QMAKE_QML_BUNDLE_PATH" - write_file("$$OUT_PWD/qt.conf", QT_CONF_CONTENTS)|error() - - # write qt.conf and copy each qml import dir into the bundle. - # But strip away archives and other files that are not needed: - !isEmpty(QMAKE_POST_LINK): QMAKE_POST_LINK += ";" - QMAKE_POST_LINK += \ - "cp $$shell_quote($$OUT_PWD/qt.conf) \"$$qtconfTargetPath\"; " \ - "test -d \"$$qmlTargetPath\" && rm -r \"$$qmlTargetPath\"; " \ - "mkdir -p \"$$qmlTargetPath\" && " \ - "for p in $$QMLPATHS; do" \ - "rsync -r --exclude='*.a' --exclude='*.prl' --exclude='*.qmltypes' " - macx-xcode: QMAKE_POST_LINK += "$p/ \"$$qmlTargetPath\"; done" - else: QMAKE_POST_LINK += "\$\$p/ \"$$qmlTargetPath\"; done" - } } } -- cgit v1.2.3 From 1b5271f27f7d5c6f814567d6d3bf211b41244cc8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 15 Dec 2016 16:20:27 +0100 Subject: determine compiler version at build time, not in configure this makes it consistent with the determination of the default include/library paths. this makes sense, as it's possible to switch the sdk/toolchain after building qt (within reason). a side effect of this change is that for compilers which emulate other compilers, both the real and the emulated version are now made available. Change-Id: Icfcc672c0d2e3d1b5e622993c366063d70ad327c Started-by: Thiago Macieira Reviewed-by: Lars Knoll --- mkspecs/common/msvc-desktop.conf | 2 +- mkspecs/features/data/macros.cpp | 28 ++++++++++++ mkspecs/features/toolchain.prf | 76 ++++++++++++++++++++++++++++++++ mkspecs/winphone-arm-msvc2013/qmake.conf | 1 - mkspecs/winphone-x86-msvc2013/qmake.conf | 1 - mkspecs/winrt-arm-msvc2013/qmake.conf | 1 - mkspecs/winrt-arm-msvc2015/qmake.conf | 1 - mkspecs/winrt-x64-msvc2013/qmake.conf | 1 - mkspecs/winrt-x64-msvc2015/qmake.conf | 2 +- mkspecs/winrt-x86-msvc2013/qmake.conf | 2 +- mkspecs/winrt-x86-msvc2015/qmake.conf | 2 +- 11 files changed, 108 insertions(+), 9 deletions(-) create mode 100644 mkspecs/features/data/macros.cpp (limited to 'mkspecs') diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf index 1b9d57bff0..ebe804db64 100644 --- a/mkspecs/common/msvc-desktop.conf +++ b/mkspecs/common/msvc-desktop.conf @@ -16,7 +16,7 @@ QMAKE_PLATFORM = win32 QMAKE_COMPILER = msvc CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe DEFINES += UNICODE WIN32 -QMAKE_COMPILER_DEFINES += _MSC_VER=$$MSC_VER _WIN32 +QMAKE_COMPILER_DEFINES += _WIN32 contains(QMAKE_TARGET.arch, x86_64) { DEFINES += WIN64 QMAKE_COMPILER_DEFINES += _WIN64 diff --git a/mkspecs/features/data/macros.cpp b/mkspecs/features/data/macros.cpp new file mode 100644 index 0000000000..88473fb980 --- /dev/null +++ b/mkspecs/features/data/macros.cpp @@ -0,0 +1,28 @@ +// Keep this file small. The pre-processed contents are eval'd by qmake. +#ifdef _MSC_VER +QMAKE_MSC_VER = _MSC_VER +QMAKE_MSC_FULL_VER = _MSC_FULL_VER +#endif +#ifdef __INTEL_COMPILER +QMAKE_ICC_VER = __INTEL_COMPILER +QMAKE_ICC_UPDATE_VER = __INTEL_COMPILER_UPDATE +#endif +#ifdef __APPLE_CC__ +QMAKE_APPLE_CC = __APPLE_CC__ +#endif +#ifdef __clang__ +#ifdef __APPLE_CC__ +QT_APPLE_CLANG_MAJOR_VERSION = __clang_major__ +QT_APPLE_CLANG_MINOR_VERSION = __clang_minor__ +QT_APPLE_CLANG_PATCH_VERSION = __clang_patchlevel__ +#else +QT_CLANG_MAJOR_VERSION = __clang_major__ +QT_CLANG_MINOR_VERSION = __clang_minor__ +QT_CLANG_PATCH_VERSION = __clang_patchlevel__ +#endif +#endif +#ifdef __GNUC__ +QT_GCC_MAJOR_VERSION = __GNUC__ +QT_GCC_MINOR_VERSION = __GNUC_MINOR__ +QT_GCC_PATCH_VERSION = __GNUC_PATCHLEVEL__ +#endif diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf index 0ef0fa8fc7..2fccd64fc5 100644 --- a/mkspecs/features/toolchain.prf +++ b/mkspecs/features/toolchain.prf @@ -58,3 +58,79 @@ isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build { !isEmpty(QMAKE_DEFAULT_INCDIRS): cache(QMAKE_DEFAULT_INCDIRS, set stash) !isEmpty(QMAKE_DEFAULT_LIBDIRS): cache(QMAKE_DEFAULT_LIBDIRS, set stash) } + +# +# Determine and cache the compiler version +# + +defineReplace(qtVariablesFromMSVC) { + return($$system("$$1 -nologo -E $$2 $$system_quote($$PWD/data/macros.cpp) NUL", lines)) +} + +defineReplace(qtVariablesFromGCC) { + null_device = /dev/null + equals(QMAKE_HOST.os, Windows): null_device = NUL + return($$system("$$1 -E $$system_quote($$PWD/data/macros.cpp) <$$null_device 2>$$null_device", lines)) +} + +host_build: \ + target_prefix = QMAKE_HOST_CXX +else: \ + target_prefix = QMAKE_CXX + +isEmpty($${target_prefix}.COMPILER_MACROS) { + msvc { + vars = $$qtVariablesFromMSVC($$QMAKE_CXX $$QMAKE_CXXFLAGS) + } else: gcc { + vars = $$qtVariablesFromGCC($$QMAKE_CXX) + } + for (v, vars) { + isEmpty(v)|contains(v, $${LITERAL_HASH}.*): next() + # Set both for the outer scope ... + eval($$v) + v ~= s/ .*// + isEmpty($$v): error("Compiler produced empty value for $${v}.") + # ... and save QMAKE_(HOST_)?CXX. in the cache. + cache($${target_prefix}.$$v, set stash, $$v) + $${target_prefix}.COMPILER_MACROS += $$v + } + cache($${target_prefix}.COMPILER_MACROS, set stash) +} else { + # load from the cache + for (i, $${target_prefix}.COMPILER_MACROS): \ + $$i = $$eval($${target_prefix}.$$i) +} + +unset(target_prefix) + +# Populate QMAKE_COMPILER_DEFINES and some compatibility variables. +# The $$format_number() calls strip leading zeros to avoid misinterpretation as octal. +!isEmpty(QMAKE_MSC_VER) { + QMAKE_COMPILER_DEFINES += _MSC_VER=$$QMAKE_MSC_VER _MSC_FULL_VER=$$QMAKE_MSC_FULL_VER + QT_MSVC_MAJOR_VERSION = $$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\1") + QT_MSVC_MINOR_VERSION = $$format_number($$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\2")) + QT_MSVC_PATCH_VERSION = $$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", "\\3")) +} +!isEmpty(QMAKE_ICC_VER) { + QMAKE_COMPILER_DEFINES += __INTEL_COMPILER=$$QMAKE_ICC_VER __INTEL_COMPILER_UPDATE=$$QMAKE_ICC_UPDATE_VER + QT_ICC_MAJOR_VERSION = $$replace(QMAKE_ICC_VER, "(..)(..)", "\\1") + QT_ICC_MINOR_VERSION = $$format_number($$replace(QMAKE_ICC_VER, "(..)(..)", "\\2")) + QT_ICC_PATCH_VERSION = $$QMAKE_ICC_UPDATE_VER +} +!isEmpty(QMAKE_APPLE_CC): \ + QMAKE_COMPILER_DEFINES += __APPLE_CC__=$$QMAKE_APPLE_CC +!isEmpty(QT_APPLE_CLANG_MAJOR_VERSION): \ + QMAKE_COMPILER_DEFINES += __clang__ \ + __clang_major__=$$QT_APPLE_CLANG_MAJOR_VERSION \ + __clang_minor__=$$QT_APPLE_CLANG_MINOR_VERSION \ + __clang_patchlevel__=$$QT_APPLE_CLANG_PATCH_VERSION +!isEmpty(QT_CLANG_MAJOR_VERSION): \ + QMAKE_COMPILER_DEFINES += __clang__ \ + __clang_major__=$$QT_CLANG_MAJOR_VERSION \ + __clang_minor__=$$QT_CLANG_MINOR_VERSION \ + __clang_patchlevel__=$$QT_CLANG_PATCH_VERSION +!isEmpty(QT_GCC_MAJOR_VERSION): \ + QMAKE_COMPILER_DEFINES += \ + __GNUC__=$$QT_GCC_MAJOR_VERSION \ + __GNUC_MINOR__=$$QT_GCC_MINOR_VERSION \ + __GNUC_PATCHLEVEL__=$$QT_GCC_PATCH_VERSION diff --git a/mkspecs/winphone-arm-msvc2013/qmake.conf b/mkspecs/winphone-arm-msvc2013/qmake.conf index ca2cc50e84..64ff295f14 100644 --- a/mkspecs/winphone-arm-msvc2013/qmake.conf +++ b/mkspecs/winphone-arm-msvc2013/qmake.conf @@ -5,7 +5,6 @@ # include(../common/winrt_winphone/qmake.conf) -QMAKE_COMPILER_DEFINES += _MSC_VER=1800 QMAKE_PLATFORM = winphone $$QMAKE_PLATFORM DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP ARM __ARM__ __ARM__ CONFIG += no_generated_target_info diff --git a/mkspecs/winphone-x86-msvc2013/qmake.conf b/mkspecs/winphone-x86-msvc2013/qmake.conf index ad8dbe1fee..bc074f03dd 100644 --- a/mkspecs/winphone-x86-msvc2013/qmake.conf +++ b/mkspecs/winphone-x86-msvc2013/qmake.conf @@ -5,7 +5,6 @@ # include(../common/winrt_winphone/qmake.conf) -QMAKE_COMPILER_DEFINES += _MSC_VER=1800 QMAKE_PLATFORM = winphone $$QMAKE_PLATFORM DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP X86 __X86__ __x86__ CONFIG += no_generated_target_info diff --git a/mkspecs/winrt-arm-msvc2013/qmake.conf b/mkspecs/winrt-arm-msvc2013/qmake.conf index f8b48b0829..547884ce7e 100644 --- a/mkspecs/winrt-arm-msvc2013/qmake.conf +++ b/mkspecs/winrt-arm-msvc2013/qmake.conf @@ -5,7 +5,6 @@ # include(../common/winrt_winphone/qmake.conf) -QMAKE_COMPILER_DEFINES += _MSC_VER=1800 DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP ARM __ARM__ __arm__ QMAKE_CFLAGS += -FS diff --git a/mkspecs/winrt-arm-msvc2015/qmake.conf b/mkspecs/winrt-arm-msvc2015/qmake.conf index 7a9375246d..ef145ae44b 100644 --- a/mkspecs/winrt-arm-msvc2015/qmake.conf +++ b/mkspecs/winrt-arm-msvc2015/qmake.conf @@ -6,7 +6,6 @@ MSC_VER = 1900 include(../common/winrt_winphone/qmake.conf) -QMAKE_COMPILER_DEFINES += _MSC_VER=1900 DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 ARM __ARM__ __arm__ QMAKE_CFLAGS += -FS diff --git a/mkspecs/winrt-x64-msvc2013/qmake.conf b/mkspecs/winrt-x64-msvc2013/qmake.conf index 594d0dafd0..c90db8b314 100644 --- a/mkspecs/winrt-x64-msvc2013/qmake.conf +++ b/mkspecs/winrt-x64-msvc2013/qmake.conf @@ -5,7 +5,6 @@ # include(../common/winrt_winphone/qmake.conf) -QMAKE_COMPILER_DEFINES += _MSC_VER=1800 DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP X64 __X64__ __x64__ QMAKE_CFLAGS += -FS diff --git a/mkspecs/winrt-x64-msvc2015/qmake.conf b/mkspecs/winrt-x64-msvc2015/qmake.conf index ca2dc88bf0..3bf5aa4bc8 100644 --- a/mkspecs/winrt-x64-msvc2015/qmake.conf +++ b/mkspecs/winrt-x64-msvc2015/qmake.conf @@ -6,7 +6,7 @@ MSC_VER = 1900 include(../common/winrt_winphone/qmake.conf) -QMAKE_COMPILER_DEFINES += _MSC_VER=1900 _WIN32 +QMAKE_COMPILER_DEFINES += _WIN32 DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__ QMAKE_CFLAGS += -FS diff --git a/mkspecs/winrt-x86-msvc2013/qmake.conf b/mkspecs/winrt-x86-msvc2013/qmake.conf index 3359102e7e..729a0ba068 100644 --- a/mkspecs/winrt-x86-msvc2013/qmake.conf +++ b/mkspecs/winrt-x86-msvc2013/qmake.conf @@ -5,7 +5,7 @@ # include(../common/winrt_winphone/qmake.conf) -QMAKE_COMPILER_DEFINES += _MSC_VER=1800 _WIN32 +QMAKE_COMPILER_DEFINES += _WIN32 DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP X86 __X86__ __x86__ QMAKE_CFLAGS += -FS diff --git a/mkspecs/winrt-x86-msvc2015/qmake.conf b/mkspecs/winrt-x86-msvc2015/qmake.conf index 3b2681e93d..00d9126790 100644 --- a/mkspecs/winrt-x86-msvc2015/qmake.conf +++ b/mkspecs/winrt-x86-msvc2015/qmake.conf @@ -6,7 +6,7 @@ MSC_VER = 1900 include(../common/winrt_winphone/qmake.conf) -QMAKE_COMPILER_DEFINES += _MSC_VER=1900 _WIN32 +QMAKE_COMPILER_DEFINES += _WIN32 DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__ QMAKE_CFLAGS += -FS -- cgit v1.2.3 From 5196d5602c70b8d4c08e49921e9459425ada8a42 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 16 Nov 2016 14:10:29 +0100 Subject: determine msvc compat version in clang spec dynamically instead of hardcoding the compat version in the spec, run cl.exe (which needs to be around anyway) to figure out what version to emulate. Change-Id: I6eae97fe9a78f8e340ecdabcdc0d48738497c6d2 Started-by: Thiago Macieira Reviewed-by: Lars Knoll --- mkspecs/features/toolchain.prf | 21 ++++++++++++++++++++- mkspecs/win32-clang-msvc2015/qmake.conf | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf index 2fccd64fc5..d71f40b831 100644 --- a/mkspecs/features/toolchain.prf +++ b/mkspecs/features/toolchain.prf @@ -80,7 +80,23 @@ else: \ isEmpty($${target_prefix}.COMPILER_MACROS) { msvc { - vars = $$qtVariablesFromMSVC($$QMAKE_CXX $$QMAKE_CXXFLAGS) + clang_cl { + # We need to obtain the cl.exe version first + vars = $$qtVariablesFromMSVC(cl) + for (v, vars) { + isEmpty(v)|contains(v, $${LITERAL_HASH}.*): next() + eval($$v) + } + isEmpty(QMAKE_MSC_FULL_VER): error("Could not determine the Visual Studio version") + + QMAKE_CFLAGS_MSVC_COMPAT = $$replace(QMAKE_MSC_FULL_VER, "(..)(..)(.*)", \ + "-fms-compatibility-version=\\1.\\2.\\3") + cache($${target_prefix}.QMAKE_CFLAGS_MSVC_COMPAT, set stash, QMAKE_CFLAGS_MSVC_COMPAT) + $${target_prefix}.COMPILER_MACROS += QMAKE_CFLAGS_MSVC_COMPAT + vars = $$qtVariablesFromMSVC($$QMAKE_CXX, $$QMAKE_CFLAGS_MSVC_COMPAT) + } else { + vars = $$qtVariablesFromMSVC($$QMAKE_CXX) + } } else: gcc { vars = $$qtVariablesFromGCC($$QMAKE_CXX) } @@ -134,3 +150,6 @@ unset(target_prefix) __GNUC__=$$QT_GCC_MAJOR_VERSION \ __GNUC_MINOR__=$$QT_GCC_MINOR_VERSION \ __GNUC_PATCHLEVEL__=$$QT_GCC_PATCH_VERSION + +QMAKE_CFLAGS += $$QMAKE_CFLAGS_MSVC_COMPAT +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_MSVC_COMPAT diff --git a/mkspecs/win32-clang-msvc2015/qmake.conf b/mkspecs/win32-clang-msvc2015/qmake.conf index 73cfdcbab9..3d04087fdf 100644 --- a/mkspecs/win32-clang-msvc2015/qmake.conf +++ b/mkspecs/win32-clang-msvc2015/qmake.conf @@ -15,7 +15,7 @@ QMAKE_COMPILER += clang_cl llvm QMAKE_CC = clang-cl QMAKE_CXX = $$QMAKE_CC -QMAKE_CFLAGS += -fms-compatibility-version=19.00.23506 -Wno-microsoft-enum-value +QMAKE_CFLAGS += -Wno-microsoft-enum-value QMAKE_CXXFLAGS = $$QMAKE_CFLAGS # Precompiled headers are not supported yet by clang -- cgit v1.2.3 From 4d9fbb33458c82aaf37d9712495a0653aae70533 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 16 Nov 2016 14:18:42 +0100 Subject: Remove hard-coded MS compiler versions from the mkspecs We're asking the compiler anyway, so we can fully use this information just as well. Note that this actually happens after the spec itself has been processed, so it was necessary to delay the version-specific flag handling as well. Change-Id: Ib57b52598e2f452985e9fffd14587b581d946022 Reviewed-by: Lars Knoll --- mkspecs/common/msvc-base.conf | 54 ------------------------- mkspecs/common/msvc-desktop.conf | 7 +--- mkspecs/common/msvc-version.conf | 68 ++++++++++++++++++++++++++++++++ mkspecs/common/winrt_winphone/qmake.conf | 4 -- mkspecs/features/win32/default_pre.prf | 2 +- mkspecs/win32-clang-msvc2015/qmake.conf | 2 - mkspecs/win32-msvc2005/qmake.conf | 2 - mkspecs/win32-msvc2008/qmake.conf | 2 - mkspecs/win32-msvc2010/qmake.conf | 2 - mkspecs/win32-msvc2012/qmake.conf | 2 - mkspecs/win32-msvc2013/qmake.conf | 2 - mkspecs/win32-msvc2015/qmake.conf | 2 - mkspecs/win32-msvc2017/qmake.conf | 2 - mkspecs/winphone-arm-msvc2013/qmake.conf | 1 - mkspecs/winphone-x86-msvc2013/qmake.conf | 1 - mkspecs/winrt-arm-msvc2013/qmake.conf | 1 - mkspecs/winrt-arm-msvc2015/qmake.conf | 2 - mkspecs/winrt-x64-msvc2013/qmake.conf | 1 - mkspecs/winrt-x64-msvc2015/qmake.conf | 2 - mkspecs/winrt-x86-msvc2013/qmake.conf | 1 - mkspecs/winrt-x86-msvc2015/qmake.conf | 2 - 21 files changed, 70 insertions(+), 92 deletions(-) delete mode 100644 mkspecs/common/msvc-base.conf create mode 100644 mkspecs/common/msvc-version.conf (limited to 'mkspecs') diff --git a/mkspecs/common/msvc-base.conf b/mkspecs/common/msvc-base.conf deleted file mode 100644 index d54b11507e..0000000000 --- a/mkspecs/common/msvc-base.conf +++ /dev/null @@ -1,54 +0,0 @@ -# -# qmake configuration for Microsoft Visual Studio C/C++ Compiler -# This mkspec is used for all win32-msvcXXXX, winrt-XXX-msvcXXX -# and winphone-XXX-msvcXXX specs -# - -# -# Version-specific changes -# - -greaterThan(MSC_VER, 1499) { - # Visual Studio 2008 (9.0) / Visual C++ 15.0 and up - QMAKE_CFLAGS_MP = -MP - QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP -} - -greaterThan(MSC_VER, 1599) { - # Visual Studio 2010 (10.0) / Visual C++ 16.0 and up - MAKEFILE_GENERATOR = MSBUILD - - QMAKE_CFLAGS_AVX = -arch:AVX - QMAKE_CFLAGS_AVX2 = -arch:AVX - - VCPROJ_EXTENSION = .vcxproj -} - -greaterThan(MSC_VER, 1699) { - # Visual Studio 2012 (11.0) / Visual C++ 17.0 and up - QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -D_HAS_EXCEPTIONS=0 - QT_CONFIG += c++11 - CONFIG += c++11 -} - -greaterThan(MSC_VER, 1799) { - # Visual Studio 2013 (12.0) / Visual C++ 18.0 and up - QMAKE_CFLAGS += -FS - QMAKE_CXXFLAGS += -FS - - equals(MSC_VER, 1800) { - QMAKE_CFLAGS_RELEASE += -Zc:strictStrings - QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings - QMAKE_CXXFLAGS_RELEASE += -Zc:strictStrings - QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings - } -} - -greaterThan(MSC_VER, 1899) { - # Visual Studio 2015 (14.0) / Visual C++ 19.0 and up - QMAKE_CFLAGS += -Zc:strictStrings - QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458 - QMAKE_CFLAGS_AVX2 = -arch:AVX2 - QMAKE_CXXFLAGS += -Zc:strictStrings -Zc:throwingNew - QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458 -wd4577 -wd4467 -} diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf index ebe804db64..604321551b 100644 --- a/mkspecs/common/msvc-desktop.conf +++ b/mkspecs/common/msvc-desktop.conf @@ -3,10 +3,9 @@ # This mkspec is used for all win32-msvcXXXX specs # -isEmpty(MSC_VER)|isEmpty(MSVC_VER): error("Source mkspec must set both MSC_VER and MSVC_VER.") - # # Baseline: Visual Studio 2005 (8.0), VC++ 14.0 +# Version-specific settings go in msvc-version.conf (loaded by default_pre) # include(angle.conf) @@ -105,7 +104,3 @@ QMAKE_RC = rc VCPROJ_EXTENSION = .vcproj VCSOLUTION_EXTENSION = .sln VCPROJ_KEYWORD = Qt4VSv1.0 - -include(msvc-base.conf) - -unset(MSC_VER) diff --git a/mkspecs/common/msvc-version.conf b/mkspecs/common/msvc-version.conf new file mode 100644 index 0000000000..8158ee37ab --- /dev/null +++ b/mkspecs/common/msvc-version.conf @@ -0,0 +1,68 @@ +# +# qmake configuration for Microsoft Visual Studio C/C++ Compiler +# This mkspec is used for all win32-msvcXXXX, winrt-XXX-msvcXXX +# and winphone-XXX-msvcXXX specs +# + +# +# Version-specific changes +# + +isEmpty(QMAKE_MSC_VER): error("msvc-version.conf loaded but QMAKE_MSC_VER isn't set") + +MSVC_VER = 8.0 + +greaterThan(QMAKE_MSC_VER, 1499) { + # Visual Studio 2008 (9.0) / Visual C++ 15.0 and up + MSVC_VER = 9.0 + QMAKE_CFLAGS_MP = -MP + QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP +} + +greaterThan(QMAKE_MSC_VER, 1599) { + # Visual Studio 2010 (10.0) / Visual C++ 16.0 and up + MSVC_VER = 10.0 + MAKEFILE_GENERATOR = MSBUILD + + QMAKE_CFLAGS_AVX = -arch:AVX + QMAKE_CFLAGS_AVX2 = -arch:AVX + + VCPROJ_EXTENSION = .vcxproj +} + +greaterThan(QMAKE_MSC_VER, 1699) { + # Visual Studio 2012 (11.0) / Visual C++ 17.0 and up + MSVC_VER = 11.0 + QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -D_HAS_EXCEPTIONS=0 + QT_CONFIG += c++11 + CONFIG += c++11 +} + +greaterThan(QMAKE_MSC_VER, 1799) { + # Visual Studio 2013 (12.0) / Visual C++ 18.0 and up + MSVC_VER = 12.0 + QMAKE_CFLAGS += -FS + QMAKE_CXXFLAGS += -FS + + equals(QMAKE_MSC_VER, 1800) { + QMAKE_CFLAGS_RELEASE += -Zc:strictStrings + QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings + QMAKE_CXXFLAGS_RELEASE += -Zc:strictStrings + QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings + } +} + +greaterThan(QMAKE_MSC_VER, 1899) { + # Visual Studio 2015 (14.0) / Visual C++ 19.0 and up + MSVC_VER = 14.0 + QMAKE_CFLAGS += -Zc:strictStrings + QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458 + QMAKE_CFLAGS_AVX2 = -arch:AVX2 + QMAKE_CXXFLAGS += -Zc:strictStrings -Zc:throwingNew + QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458 -wd4577 -wd4467 +} + +greaterThan(QMAKE_MSC_VER, 1909) { + # Visual Studio 2017 (15.0) / Visual C++ 19.10 and up + MSVC_VER = 15.0 +} diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf index 05c9bd39a5..27269176d0 100644 --- a/mkspecs/common/winrt_winphone/qmake.conf +++ b/mkspecs/common/winrt_winphone/qmake.conf @@ -97,8 +97,4 @@ WINRT_ASSETS_PATH = $$PWD/assets WINRT_MANIFEST.capabilities = defaults WINRT_MANIFEST.capabilities_device = defaults -include(../msvc-base.conf) - -unset(MSC_VER) - load(qt_config) diff --git a/mkspecs/features/win32/default_pre.prf b/mkspecs/features/win32/default_pre.prf index 385184f632..11160f5b5c 100644 --- a/mkspecs/features/win32/default_pre.prf +++ b/mkspecs/features/win32/default_pre.prf @@ -1,3 +1,3 @@ CONFIG = rtti_off incremental_off windows $$CONFIG load(default_pre) - +msvc:!intel_icl:!clang_cl: include(../../common/msvc-version.conf) diff --git a/mkspecs/win32-clang-msvc2015/qmake.conf b/mkspecs/win32-clang-msvc2015/qmake.conf index 3d04087fdf..aa78ebf83b 100644 --- a/mkspecs/win32-clang-msvc2015/qmake.conf +++ b/mkspecs/win32-clang-msvc2015/qmake.conf @@ -6,8 +6,6 @@ # Notice: this uses the clang-cl wrapper # -MSC_VER = 1900 -MSVC_VER = 14.0 include(../common/msvc-desktop.conf) QMAKE_COMPILER += clang_cl llvm diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf index 458f37cc04..3fbf797b5b 100644 --- a/mkspecs/win32-msvc2005/qmake.conf +++ b/mkspecs/win32-msvc2005/qmake.conf @@ -4,7 +4,5 @@ # Written for Microsoft Visual C++ 2005 # -MSC_VER = 1400 -MSVC_VER = 8.0 include(../common/msvc-desktop.conf) load(qt_config) diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf index d1382ff2d4..0d9eac7008 100644 --- a/mkspecs/win32-msvc2008/qmake.conf +++ b/mkspecs/win32-msvc2008/qmake.conf @@ -4,7 +4,5 @@ # Written for Microsoft Visual C++ 2008 # -MSC_VER = 1500 -MSVC_VER = 9.0 include(../common/msvc-desktop.conf) load(qt_config) diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf index 3ad9d478ee..3b8a50f17a 100644 --- a/mkspecs/win32-msvc2010/qmake.conf +++ b/mkspecs/win32-msvc2010/qmake.conf @@ -4,7 +4,5 @@ # Written for Microsoft Visual C++ 2010 # -MSC_VER = 1600 -MSVC_VER = 10.0 include(../common/msvc-desktop.conf) load(qt_config) diff --git a/mkspecs/win32-msvc2012/qmake.conf b/mkspecs/win32-msvc2012/qmake.conf index 3d9c5864af..25aaf1f5d1 100644 --- a/mkspecs/win32-msvc2012/qmake.conf +++ b/mkspecs/win32-msvc2012/qmake.conf @@ -4,7 +4,5 @@ # Written for Microsoft Visual C++ 2012 # -MSC_VER = 1700 -MSVC_VER = 11.0 include(../common/msvc-desktop.conf) load(qt_config) diff --git a/mkspecs/win32-msvc2013/qmake.conf b/mkspecs/win32-msvc2013/qmake.conf index 34108b2c32..87f72317ba 100644 --- a/mkspecs/win32-msvc2013/qmake.conf +++ b/mkspecs/win32-msvc2013/qmake.conf @@ -4,7 +4,5 @@ # Written for Microsoft Visual C++ 2013 # -MSC_VER = 1800 -MSVC_VER = 12.0 include(../common/msvc-desktop.conf) load(qt_config) diff --git a/mkspecs/win32-msvc2015/qmake.conf b/mkspecs/win32-msvc2015/qmake.conf index ea654d4296..e1f5376894 100644 --- a/mkspecs/win32-msvc2015/qmake.conf +++ b/mkspecs/win32-msvc2015/qmake.conf @@ -4,7 +4,5 @@ # Written for Microsoft Visual C++ 2015 # -MSC_VER = 1900 -MSVC_VER = 14.0 include(../common/msvc-desktop.conf) load(qt_config) diff --git a/mkspecs/win32-msvc2017/qmake.conf b/mkspecs/win32-msvc2017/qmake.conf index b8351eb3fe..c945c8c00d 100644 --- a/mkspecs/win32-msvc2017/qmake.conf +++ b/mkspecs/win32-msvc2017/qmake.conf @@ -4,7 +4,5 @@ # Written for Microsoft Visual C++ 2017 # -MSC_VER = 1910 -MSVC_VER = 15.0 include(../common/msvc-desktop.conf) load(qt_config) diff --git a/mkspecs/winphone-arm-msvc2013/qmake.conf b/mkspecs/winphone-arm-msvc2013/qmake.conf index 64ff295f14..7656adbf00 100644 --- a/mkspecs/winphone-arm-msvc2013/qmake.conf +++ b/mkspecs/winphone-arm-msvc2013/qmake.conf @@ -16,7 +16,6 @@ QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib QMAKE_LIBS += WindowsPhoneCore.lib PhoneAppModelHost.lib VCPROJ_ARCH = ARM -MSVC_VER = 12.0 WINSDK_VER = 8.1 WINTARGET_VER = WP81 WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in diff --git a/mkspecs/winphone-x86-msvc2013/qmake.conf b/mkspecs/winphone-x86-msvc2013/qmake.conf index bc074f03dd..aa9e5b791b 100644 --- a/mkspecs/winphone-x86-msvc2013/qmake.conf +++ b/mkspecs/winphone-x86-msvc2013/qmake.conf @@ -16,7 +16,6 @@ QMAKE_LFLAGS += /MACHINE:X86 /NODEFAULTLIB:kernel32.lib QMAKE_LIBS += WindowsPhoneCore.lib PhoneAppModelHost.lib VCPROJ_ARCH = Win32 -MSVC_VER = 12.0 WINSDK_VER = 8.1 WINTARGET_VER = WP81 WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in diff --git a/mkspecs/winrt-arm-msvc2013/qmake.conf b/mkspecs/winrt-arm-msvc2013/qmake.conf index 547884ce7e..14bd16d555 100644 --- a/mkspecs/winrt-arm-msvc2013/qmake.conf +++ b/mkspecs/winrt-arm-msvc2013/qmake.conf @@ -14,7 +14,6 @@ QMAKE_LFLAGS += /MACHINE:ARM QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib VCPROJ_ARCH = ARM -MSVC_VER = 12.0 WINSDK_VER = 8.1 WINTARGET_VER = winv6.3 WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1/AppxManifest.xml.in diff --git a/mkspecs/winrt-arm-msvc2015/qmake.conf b/mkspecs/winrt-arm-msvc2015/qmake.conf index ef145ae44b..8bca6f4af8 100644 --- a/mkspecs/winrt-arm-msvc2015/qmake.conf +++ b/mkspecs/winrt-arm-msvc2015/qmake.conf @@ -4,7 +4,6 @@ # Written for Microsoft Visual C++ 2015 # -MSC_VER = 1900 include(../common/winrt_winphone/qmake.conf) DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 ARM __ARM__ __arm__ @@ -15,7 +14,6 @@ QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib VCPROJ_ARCH = ARM -MSVC_VER = 14.0 WINSDK_VER = 10.0 WINTARGET_VER = winv10.0 WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in diff --git a/mkspecs/winrt-x64-msvc2013/qmake.conf b/mkspecs/winrt-x64-msvc2013/qmake.conf index c90db8b314..238f9f0d93 100644 --- a/mkspecs/winrt-x64-msvc2013/qmake.conf +++ b/mkspecs/winrt-x64-msvc2013/qmake.conf @@ -14,7 +14,6 @@ QMAKE_LFLAGS += /MACHINE:X64 QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib VCPROJ_ARCH = x64 -MSVC_VER = 12.0 WINSDK_VER = 8.1 WINTARGET_VER = winv6.3 WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1/AppxManifest.xml.in diff --git a/mkspecs/winrt-x64-msvc2015/qmake.conf b/mkspecs/winrt-x64-msvc2015/qmake.conf index 3bf5aa4bc8..d7e2fcf3c2 100644 --- a/mkspecs/winrt-x64-msvc2015/qmake.conf +++ b/mkspecs/winrt-x64-msvc2015/qmake.conf @@ -4,7 +4,6 @@ # Written for Microsoft Visual C++ 2015 # -MSC_VER = 1900 include(../common/winrt_winphone/qmake.conf) QMAKE_COMPILER_DEFINES += _WIN32 DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__ @@ -16,7 +15,6 @@ QMAKE_LFLAGS += /MACHINE:X64 /NODEFAULTLIB:kernel32.lib QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib VCPROJ_ARCH = x64 -MSVC_VER = 14.0 WINSDK_VER = 10.0 WINTARGET_VER = winv10.0 WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in diff --git a/mkspecs/winrt-x86-msvc2013/qmake.conf b/mkspecs/winrt-x86-msvc2013/qmake.conf index 729a0ba068..cc125d3f0c 100644 --- a/mkspecs/winrt-x86-msvc2013/qmake.conf +++ b/mkspecs/winrt-x86-msvc2013/qmake.conf @@ -15,7 +15,6 @@ QMAKE_LFLAGS += /SAFESEH /MACHINE:X86 QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib VCPROJ_ARCH = Win32 -MSVC_VER = 12.0 WINSDK_VER = 8.1 WINTARGET_VER = winv6.3 WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1/AppxManifest.xml.in diff --git a/mkspecs/winrt-x86-msvc2015/qmake.conf b/mkspecs/winrt-x86-msvc2015/qmake.conf index 00d9126790..0983174ae2 100644 --- a/mkspecs/winrt-x86-msvc2015/qmake.conf +++ b/mkspecs/winrt-x86-msvc2015/qmake.conf @@ -4,7 +4,6 @@ # Written for Microsoft Visual C++ 2015 # -MSC_VER = 1900 include(../common/winrt_winphone/qmake.conf) QMAKE_COMPILER_DEFINES += _WIN32 DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__ @@ -15,7 +14,6 @@ QMAKE_LFLAGS += /SAFESEH /MACHINE:X86 /NODEFAULTLIB:kernel32.lib QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib VCPROJ_ARCH = Win32 -MSVC_VER = 14.0 WINSDK_VER = 10.0 WINTARGET_VER = winv10.0 WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in -- cgit v1.2.3 From 04403d5b12debadf95b565bf84e0527ae787c87d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 15 Jun 2016 23:21:03 -0700 Subject: Merge all "win32-msvc*" mkspecs into one Since we can tell the MSVC version from the compiler now, each of the qmake.conf files is now the same, so let's just have "win32-msvc" and be future-proof. Likewise for win32-clang-msvc. qplatformdefs.h was already common. Since we can't obtain the MSVC version from the unified mkspec name any more, I dropped the warning level during the qmake bootstrap to reduce the number of warnings that need to be disabled from compiler version to version. There is no point in keeping the old mkspecs, but configure will re-map the -platform argument to the unified spec as necessary, to keep existing configure command lines working. [ChangeLog][Visual Studio] Qt now has a common mkspec for all Visual Studio versions, called "win32-msvc". The old names which contained the version number are now gone (but qmake scopes based on the old names continue to work). The version of the compiler can be obtained from the MSC_VER and MSVC_VER variables (for example, for Visual Studio 2015, those contain the values 1900 and 14.0, respectively). Those variables are also available with the Intel compiler (win32-icc) and with Clang (win32-clang-msvc). Done-with: Oswald Buddenhagen Change-Id: Ib57b52598e2f452985e9fffd14587c0a77a5c09c Reviewed-by: Thiago Macieira Reviewed-by: Oswald Buddenhagen --- mkspecs/common/msvc-desktop.conf | 2 +- mkspecs/common/msvc-version.conf | 18 +++- mkspecs/win32-clang-msvc/qmake.conf | 20 ++++ mkspecs/win32-clang-msvc/qplatformdefs.h | 40 ++++++++ mkspecs/win32-clang-msvc2015/qmake.conf | 22 ----- mkspecs/win32-clang-msvc2015/qplatformdefs.h | 34 ------- mkspecs/win32-icc/qplatformdefs.h | 2 +- mkspecs/win32-msvc/qmake.conf | 8 ++ mkspecs/win32-msvc/qplatformdefs.h | 140 +++++++++++++++++++++++++++ mkspecs/win32-msvc2005/qmake.conf | 8 -- mkspecs/win32-msvc2005/qplatformdefs.h | 140 --------------------------- mkspecs/win32-msvc2008/qmake.conf | 8 -- mkspecs/win32-msvc2008/qplatformdefs.h | 40 -------- mkspecs/win32-msvc2010/qmake.conf | 8 -- mkspecs/win32-msvc2010/qplatformdefs.h | 40 -------- mkspecs/win32-msvc2012/qmake.conf | 8 -- mkspecs/win32-msvc2012/qplatformdefs.h | 40 -------- mkspecs/win32-msvc2013/qmake.conf | 8 -- mkspecs/win32-msvc2013/qplatformdefs.h | 40 -------- mkspecs/win32-msvc2015/qmake.conf | 8 -- mkspecs/win32-msvc2015/qplatformdefs.h | 40 -------- mkspecs/win32-msvc2017/qmake.conf | 8 -- mkspecs/win32-msvc2017/qplatformdefs.h | 34 ------- 23 files changed, 226 insertions(+), 490 deletions(-) create mode 100644 mkspecs/win32-clang-msvc/qmake.conf create mode 100644 mkspecs/win32-clang-msvc/qplatformdefs.h delete mode 100644 mkspecs/win32-clang-msvc2015/qmake.conf delete mode 100644 mkspecs/win32-clang-msvc2015/qplatformdefs.h create mode 100644 mkspecs/win32-msvc/qmake.conf create mode 100644 mkspecs/win32-msvc/qplatformdefs.h delete mode 100644 mkspecs/win32-msvc2005/qmake.conf delete mode 100644 mkspecs/win32-msvc2005/qplatformdefs.h delete mode 100644 mkspecs/win32-msvc2008/qmake.conf delete mode 100644 mkspecs/win32-msvc2008/qplatformdefs.h delete mode 100644 mkspecs/win32-msvc2010/qmake.conf delete mode 100644 mkspecs/win32-msvc2010/qplatformdefs.h delete mode 100644 mkspecs/win32-msvc2012/qmake.conf delete mode 100644 mkspecs/win32-msvc2012/qplatformdefs.h delete mode 100644 mkspecs/win32-msvc2013/qmake.conf delete mode 100644 mkspecs/win32-msvc2013/qplatformdefs.h delete mode 100644 mkspecs/win32-msvc2015/qmake.conf delete mode 100644 mkspecs/win32-msvc2015/qplatformdefs.h delete mode 100644 mkspecs/win32-msvc2017/qmake.conf delete mode 100644 mkspecs/win32-msvc2017/qplatformdefs.h (limited to 'mkspecs') diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf index 604321551b..52d9408c1c 100644 --- a/mkspecs/common/msvc-desktop.conf +++ b/mkspecs/common/msvc-desktop.conf @@ -1,6 +1,6 @@ # # qmake configuration for Microsoft Visual Studio C/C++ Compiler -# This mkspec is used for all win32-msvcXXXX specs +# This mkspec is used by the win32-msvc and win32-clang-msvc specs # # diff --git a/mkspecs/common/msvc-version.conf b/mkspecs/common/msvc-version.conf index 8158ee37ab..147009cd9f 100644 --- a/mkspecs/common/msvc-version.conf +++ b/mkspecs/common/msvc-version.conf @@ -1,7 +1,7 @@ # # qmake configuration for Microsoft Visual Studio C/C++ Compiler -# This mkspec is used for all win32-msvcXXXX, winrt-XXX-msvcXXX -# and winphone-XXX-msvcXXX specs +# This file is used by win32-msvc, win32-clang-msvc, and all +# winphone-XXX-msvcXXXX specs # # @@ -11,10 +11,12 @@ isEmpty(QMAKE_MSC_VER): error("msvc-version.conf loaded but QMAKE_MSC_VER isn't set") MSVC_VER = 8.0 +COMPAT_MKSPEC = win32-msvc2005 greaterThan(QMAKE_MSC_VER, 1499) { # Visual Studio 2008 (9.0) / Visual C++ 15.0 and up MSVC_VER = 9.0 + COMPAT_MKSPEC = win32-msvc2008 QMAKE_CFLAGS_MP = -MP QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP } @@ -22,6 +24,7 @@ greaterThan(QMAKE_MSC_VER, 1499) { greaterThan(QMAKE_MSC_VER, 1599) { # Visual Studio 2010 (10.0) / Visual C++ 16.0 and up MSVC_VER = 10.0 + COMPAT_MKSPEC = win32-msvc2010 MAKEFILE_GENERATOR = MSBUILD QMAKE_CFLAGS_AVX = -arch:AVX @@ -33,6 +36,7 @@ greaterThan(QMAKE_MSC_VER, 1599) { greaterThan(QMAKE_MSC_VER, 1699) { # Visual Studio 2012 (11.0) / Visual C++ 17.0 and up MSVC_VER = 11.0 + COMPAT_MKSPEC = win32-msvc2012 QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -D_HAS_EXCEPTIONS=0 QT_CONFIG += c++11 CONFIG += c++11 @@ -41,6 +45,7 @@ greaterThan(QMAKE_MSC_VER, 1699) { greaterThan(QMAKE_MSC_VER, 1799) { # Visual Studio 2013 (12.0) / Visual C++ 18.0 and up MSVC_VER = 12.0 + COMPAT_MKSPEC = win32-msvc2013 QMAKE_CFLAGS += -FS QMAKE_CXXFLAGS += -FS @@ -55,6 +60,7 @@ greaterThan(QMAKE_MSC_VER, 1799) { greaterThan(QMAKE_MSC_VER, 1899) { # Visual Studio 2015 (14.0) / Visual C++ 19.0 and up MSVC_VER = 14.0 + COMPAT_MKSPEC = win32-msvc2015 QMAKE_CFLAGS += -Zc:strictStrings QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458 QMAKE_CFLAGS_AVX2 = -arch:AVX2 @@ -65,4 +71,12 @@ greaterThan(QMAKE_MSC_VER, 1899) { greaterThan(QMAKE_MSC_VER, 1909) { # Visual Studio 2017 (15.0) / Visual C++ 19.10 and up MSVC_VER = 15.0 + COMPAT_MKSPEC = win32-msvc2017 } + +greaterThan(QMAKE_MSC_VER, 1910) { + # No compat spec past MSVC 2017 + COMPAT_MKSPEC = +} + +!isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC diff --git a/mkspecs/win32-clang-msvc/qmake.conf b/mkspecs/win32-clang-msvc/qmake.conf new file mode 100644 index 0000000000..0041788ef9 --- /dev/null +++ b/mkspecs/win32-clang-msvc/qmake.conf @@ -0,0 +1,20 @@ +# +# qmake configuration for win32-clang-msvc +# +# Notice: this uses the clang-cl wrapper +# + +include(../common/msvc-desktop.conf) + +QMAKE_COMPILER += clang_cl llvm + +QMAKE_CC = clang-cl +QMAKE_CXX = $$QMAKE_CC + +QMAKE_CFLAGS += -Wno-microsoft-enum-value +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS + +# Precompiled headers are not supported yet by clang +CONFIG -= precompile_header + +load(qt_config) diff --git a/mkspecs/win32-clang-msvc/qplatformdefs.h b/mkspecs/win32-clang-msvc/qplatformdefs.h new file mode 100644 index 0000000000..8a3afa7630 --- /dev/null +++ b/mkspecs/win32-clang-msvc/qplatformdefs.h @@ -0,0 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../win32-msvc/qplatformdefs.h" diff --git a/mkspecs/win32-clang-msvc2015/qmake.conf b/mkspecs/win32-clang-msvc2015/qmake.conf deleted file mode 100644 index aa78ebf83b..0000000000 --- a/mkspecs/win32-clang-msvc2015/qmake.conf +++ /dev/null @@ -1,22 +0,0 @@ -# -# qmake configuration for win32-clang-msvc2015 - -# -# Written for Clang 3.8 with Microsoft Visual C++ 2015 Update 1 -# Notice: this uses the clang-cl wrapper -# - -include(../common/msvc-desktop.conf) - -QMAKE_COMPILER += clang_cl llvm - -QMAKE_CC = clang-cl -QMAKE_CXX = $$QMAKE_CC - -QMAKE_CFLAGS += -Wno-microsoft-enum-value -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS - -# Precompiled headers are not supported yet by clang -CONFIG -= precompile_header - -load(qt_config) diff --git a/mkspecs/win32-clang-msvc2015/qplatformdefs.h b/mkspecs/win32-clang-msvc2015/qplatformdefs.h deleted file mode 100644 index 7100e3aa41..0000000000 --- a/mkspecs/win32-clang-msvc2015/qplatformdefs.h +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "../win32-msvc2005/qplatformdefs.h" diff --git a/mkspecs/win32-icc/qplatformdefs.h b/mkspecs/win32-icc/qplatformdefs.h index 9c59826555..8a3afa7630 100644 --- a/mkspecs/win32-icc/qplatformdefs.h +++ b/mkspecs/win32-icc/qplatformdefs.h @@ -37,4 +37,4 @@ ** ****************************************************************************/ -#include "../win32-msvc2005/qplatformdefs.h" +#include "../win32-msvc/qplatformdefs.h" diff --git a/mkspecs/win32-msvc/qmake.conf b/mkspecs/win32-msvc/qmake.conf new file mode 100644 index 0000000000..1d8b8f0e97 --- /dev/null +++ b/mkspecs/win32-msvc/qmake.conf @@ -0,0 +1,8 @@ +# +# qmake configuration for win32-msvc +# +# Written for Microsoft Visual C++ (all desktop versions) +# + +include(../common/msvc-desktop.conf) +load(qt_config) diff --git a/mkspecs/win32-msvc/qplatformdefs.h b/mkspecs/win32-msvc/qplatformdefs.h new file mode 100644 index 0000000000..9573d18a40 --- /dev/null +++ b/mkspecs/win32-msvc/qplatformdefs.h @@ -0,0 +1,140 @@ +/**************************************************************************** +** +** 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" + +#define _POSIX_ +#include +#undef _POSIX_ + +#include +#include +#include +#include +#include +#include +#include +#include + +#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 ::_stat +#define QT_FSTAT ::_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 +#else +# define QT_STAT_LNK 0120000 +#endif +#define QT_FILENO _fileno +#define QT_OPEN ::_open +#define QT_CLOSE ::_close +#ifdef QT_LARGEFILE_SUPPORT +#define QT_LSEEK ::_lseeki64 +#define QT_TSTAT ::_tstati64 +#else +#define QT_LSEEK ::_lseek +#define QT_TSTAT ::_tstat +#endif +#define QT_READ ::_read +#define QT_WRITE ::_write +#define QT_ACCESS ::_access +#define QT_GETCWD ::_getcwd +#define QT_CHDIR ::_chdir +#define QT_MKDIR ::_mkdir +#define QT_RMDIR ::_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 +#if defined(O_TEXT) +# define QT_OPEN_TEXT _O_TEXT +# define QT_OPEN_BINARY _O_BINARY +#endif + +#include "../common/c89/qplatformdefs.h" + +#ifdef QT_LARGEFILE_SUPPORT +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + +#define QT_FSEEK ::_fseeki64 +#define QT_FTELL ::_ftelli64 +#define QT_OFF_T __int64 +#endif + +#define QT_SIGNAL_ARGS int + +#define QT_VSNPRINTF(buffer, count, format, arg) \ + vsnprintf_s(buffer, count, count-1, 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/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf deleted file mode 100644 index 3fbf797b5b..0000000000 --- a/mkspecs/win32-msvc2005/qmake.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# qmake configuration for win32-msvc2005 -# -# Written for Microsoft Visual C++ 2005 -# - -include(../common/msvc-desktop.conf) -load(qt_config) diff --git a/mkspecs/win32-msvc2005/qplatformdefs.h b/mkspecs/win32-msvc2005/qplatformdefs.h deleted file mode 100644 index 9573d18a40..0000000000 --- a/mkspecs/win32-msvc2005/qplatformdefs.h +++ /dev/null @@ -1,140 +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" - -#define _POSIX_ -#include -#undef _POSIX_ - -#include -#include -#include -#include -#include -#include -#include -#include - -#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 ::_stat -#define QT_FSTAT ::_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 -#else -# define QT_STAT_LNK 0120000 -#endif -#define QT_FILENO _fileno -#define QT_OPEN ::_open -#define QT_CLOSE ::_close -#ifdef QT_LARGEFILE_SUPPORT -#define QT_LSEEK ::_lseeki64 -#define QT_TSTAT ::_tstati64 -#else -#define QT_LSEEK ::_lseek -#define QT_TSTAT ::_tstat -#endif -#define QT_READ ::_read -#define QT_WRITE ::_write -#define QT_ACCESS ::_access -#define QT_GETCWD ::_getcwd -#define QT_CHDIR ::_chdir -#define QT_MKDIR ::_mkdir -#define QT_RMDIR ::_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 -#if defined(O_TEXT) -# define QT_OPEN_TEXT _O_TEXT -# define QT_OPEN_BINARY _O_BINARY -#endif - -#include "../common/c89/qplatformdefs.h" - -#ifdef QT_LARGEFILE_SUPPORT -#undef QT_FSEEK -#undef QT_FTELL -#undef QT_OFF_T - -#define QT_FSEEK ::_fseeki64 -#define QT_FTELL ::_ftelli64 -#define QT_OFF_T __int64 -#endif - -#define QT_SIGNAL_ARGS int - -#define QT_VSNPRINTF(buffer, count, format, arg) \ - vsnprintf_s(buffer, count, count-1, 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/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf deleted file mode 100644 index 0d9eac7008..0000000000 --- a/mkspecs/win32-msvc2008/qmake.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# qmake configuration for win32-msvc2008 -# -# Written for Microsoft Visual C++ 2008 -# - -include(../common/msvc-desktop.conf) -load(qt_config) diff --git a/mkspecs/win32-msvc2008/qplatformdefs.h b/mkspecs/win32-msvc2008/qplatformdefs.h deleted file mode 100644 index 9c59826555..0000000000 --- a/mkspecs/win32-msvc2008/qplatformdefs.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "../win32-msvc2005/qplatformdefs.h" diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf deleted file mode 100644 index 3b8a50f17a..0000000000 --- a/mkspecs/win32-msvc2010/qmake.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# qmake configuration for win32-msvc2010 -# -# Written for Microsoft Visual C++ 2010 -# - -include(../common/msvc-desktop.conf) -load(qt_config) diff --git a/mkspecs/win32-msvc2010/qplatformdefs.h b/mkspecs/win32-msvc2010/qplatformdefs.h deleted file mode 100644 index 9c59826555..0000000000 --- a/mkspecs/win32-msvc2010/qplatformdefs.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "../win32-msvc2005/qplatformdefs.h" diff --git a/mkspecs/win32-msvc2012/qmake.conf b/mkspecs/win32-msvc2012/qmake.conf deleted file mode 100644 index 25aaf1f5d1..0000000000 --- a/mkspecs/win32-msvc2012/qmake.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# qmake configuration for win32-msvc2012 -# -# Written for Microsoft Visual C++ 2012 -# - -include(../common/msvc-desktop.conf) -load(qt_config) diff --git a/mkspecs/win32-msvc2012/qplatformdefs.h b/mkspecs/win32-msvc2012/qplatformdefs.h deleted file mode 100644 index 9c59826555..0000000000 --- a/mkspecs/win32-msvc2012/qplatformdefs.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "../win32-msvc2005/qplatformdefs.h" diff --git a/mkspecs/win32-msvc2013/qmake.conf b/mkspecs/win32-msvc2013/qmake.conf deleted file mode 100644 index 87f72317ba..0000000000 --- a/mkspecs/win32-msvc2013/qmake.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# qmake configuration for win32-msvc2013 -# -# Written for Microsoft Visual C++ 2013 -# - -include(../common/msvc-desktop.conf) -load(qt_config) diff --git a/mkspecs/win32-msvc2013/qplatformdefs.h b/mkspecs/win32-msvc2013/qplatformdefs.h deleted file mode 100644 index 9c59826555..0000000000 --- a/mkspecs/win32-msvc2013/qplatformdefs.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "../win32-msvc2005/qplatformdefs.h" diff --git a/mkspecs/win32-msvc2015/qmake.conf b/mkspecs/win32-msvc2015/qmake.conf deleted file mode 100644 index e1f5376894..0000000000 --- a/mkspecs/win32-msvc2015/qmake.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# qmake configuration for win32-msvc2015 -# -# Written for Microsoft Visual C++ 2015 -# - -include(../common/msvc-desktop.conf) -load(qt_config) diff --git a/mkspecs/win32-msvc2015/qplatformdefs.h b/mkspecs/win32-msvc2015/qplatformdefs.h deleted file mode 100644 index 9c59826555..0000000000 --- a/mkspecs/win32-msvc2015/qplatformdefs.h +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "../win32-msvc2005/qplatformdefs.h" diff --git a/mkspecs/win32-msvc2017/qmake.conf b/mkspecs/win32-msvc2017/qmake.conf deleted file mode 100644 index c945c8c00d..0000000000 --- a/mkspecs/win32-msvc2017/qmake.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# qmake configuration for win32-msvc2017 -# -# Written for Microsoft Visual C++ 2017 -# - -include(../common/msvc-desktop.conf) -load(qt_config) diff --git a/mkspecs/win32-msvc2017/qplatformdefs.h b/mkspecs/win32-msvc2017/qplatformdefs.h deleted file mode 100644 index 7100e3aa41..0000000000 --- a/mkspecs/win32-msvc2017/qplatformdefs.h +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the qmake spec of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "../win32-msvc2005/qplatformdefs.h" -- cgit v1.2.3 From 7957d0fbd71767055b1fa408d3a05d3892718c84 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Thu, 22 Dec 2016 16:54:12 -0800 Subject: Fix typo in -Xarch handling Change-Id: I05e1491f3b1b5af28992ea53d513c709e1161a8e Reviewed-by: Oswald Buddenhagen --- mkspecs/features/mac/sdk.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf index c7f5850aa0..16a46a362c 100644 --- a/mkspecs/features/mac/sdk.prf +++ b/mkspecs/features/mac/sdk.prf @@ -91,7 +91,7 @@ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_ -Wl,-syslibroot,$$xcodeSDKInfo(Path, $$sdk) QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch}) - QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch}) + QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch}) QMAKE_EXTRA_VARIABLES += \ QMAKE_XARCH_CFLAGS_$${arch} \ -- cgit v1.2.3 From 9efd29d1e27702fadcdfa207c9605fcb5b6b8dba Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 15 Dec 2016 15:50:19 +0100 Subject: Fix GCC 7 developer build Disables escalating the implicit fallthough warning to an error, since Qt is not yet free of unmarked implicit fallthroughs. With this we can clean the code in the dev branch instead of in 5.6 and 5.8, and only backport bug fixes. Change-Id: Id30ee21b77de6defcb7d5bb1e05e86c0db098481 Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- mkspecs/features/qt_common.prf | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index d30983f62b..7967697eb4 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -98,6 +98,9 @@ warnings_are_errors:warning_clean { # error: assuming signed overflow does not occur when assuming that (X + c) < X is always false QMAKE_CXXFLAGS_WARN_ON += -Wno-error=strict-overflow + # GCC 7 includes -Wimplicit-fallthrough in -Wextra, but Qt is not yet free of implicit fallthroughs. + greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-error=implicit-fallthrough + # Work-around for bug https://code.google.com/p/android/issues/detail?id=58135 android: QMAKE_CXXFLAGS_WARN_ON += -Wno-error=literal-suffix } -- cgit v1.2.3 From 612f1f4668b029c41e4bac1038d42f4899740dd4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 15 Dec 2016 16:03:14 +0100 Subject: centralize QMAKE_COMPILER_DEFINES+=_WIN32 also for winrt specs this is mostly for appearances (as evidenced by everything working despite it being missing from some specs), as the variable is just a fallback for moc.prf's automatic detection. Change-Id: Ie4af24c02ec03aaa1810281d1bb6876ea38cedf8 Reviewed-by: Jake Petroules --- mkspecs/common/winrt_winphone/qmake.conf | 1 + mkspecs/winrt-x64-msvc2015/qmake.conf | 1 - mkspecs/winrt-x86-msvc2013/qmake.conf | 1 - mkspecs/winrt-x86-msvc2015/qmake.conf | 1 - 4 files changed, 1 insertion(+), 3 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf index 27269176d0..5f87dc0be1 100644 --- a/mkspecs/common/winrt_winphone/qmake.conf +++ b/mkspecs/common/winrt_winphone/qmake.conf @@ -11,6 +11,7 @@ QMAKE_COMPILER = msvc QMAKE_PLATFORM = winrt win32 CONFIG = package_manifest $$CONFIG incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target rtti DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT Q_BYTE_ORDER=Q_LITTLE_ENDIAN +QMAKE_COMPILER_DEFINES += _WIN32 DEPLOYMENT_PLUGIN += qwinrt diff --git a/mkspecs/winrt-x64-msvc2015/qmake.conf b/mkspecs/winrt-x64-msvc2015/qmake.conf index d7e2fcf3c2..d503399e3c 100644 --- a/mkspecs/winrt-x64-msvc2015/qmake.conf +++ b/mkspecs/winrt-x64-msvc2015/qmake.conf @@ -5,7 +5,6 @@ # include(../common/winrt_winphone/qmake.conf) -QMAKE_COMPILER_DEFINES += _WIN32 DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__ QMAKE_CFLAGS += -FS diff --git a/mkspecs/winrt-x86-msvc2013/qmake.conf b/mkspecs/winrt-x86-msvc2013/qmake.conf index cc125d3f0c..ae1d675b88 100644 --- a/mkspecs/winrt-x86-msvc2013/qmake.conf +++ b/mkspecs/winrt-x86-msvc2013/qmake.conf @@ -5,7 +5,6 @@ # include(../common/winrt_winphone/qmake.conf) -QMAKE_COMPILER_DEFINES += _WIN32 DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP X86 __X86__ __x86__ QMAKE_CFLAGS += -FS diff --git a/mkspecs/winrt-x86-msvc2015/qmake.conf b/mkspecs/winrt-x86-msvc2015/qmake.conf index 0983174ae2..37ce0e5525 100644 --- a/mkspecs/winrt-x86-msvc2015/qmake.conf +++ b/mkspecs/winrt-x86-msvc2015/qmake.conf @@ -5,7 +5,6 @@ # include(../common/winrt_winphone/qmake.conf) -QMAKE_COMPILER_DEFINES += _WIN32 DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__ QMAKE_CFLAGS += -FS -- cgit v1.2.3 From bbf7fa136824f87259acd9d8954160e5e1fe8358 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 23 Dec 2016 15:12:04 +0100 Subject: remove pointless conditionals uikit already implies !host_build, as host builds are executed with the host spec. and the only darwin alternative to uikit is macos. Change-Id: I6b47d68bad5d4427640901ff1e32dacf9a4e352b Reviewed-by: Jake Petroules --- mkspecs/features/mac/sdk.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf index 16a46a362c..654d487600 100644 --- a/mkspecs/features/mac/sdk.prf +++ b/mkspecs/features/mac/sdk.prf @@ -49,7 +49,7 @@ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_ } !equals(MAKEFILE_GENERATOR, XCODE) { - uikit:!host_build { + uikit { ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET @@ -109,7 +109,7 @@ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_ QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT} - } else: osx { + } else { version_identifier = macosx deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET version_min_flag = -m$${version_identifier}-version-min=$$deployment_target -- cgit v1.2.3 From afd82630c2da4369b95baf9930e3d00dce309d63 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 23 Dec 2016 15:08:39 +0100 Subject: delay resolution of darwin deployment target and architectures there appears to be no particular reason why this ended up in sdk.prf, and it has become an actual problem now that the sdk is resolved from default_pre.prf already, making it impossible for projects to override the deployment target. Task-number: QTBUG-56965 Change-Id: I8e319d10cdfb95acc1da1f431c8b8d4f76d1168e Reviewed-by: Jake Petroules --- mkspecs/features/mac/default_post.prf | 85 ++++++++++++++++++++++++++++++++--- mkspecs/features/mac/sdk.prf | 75 ------------------------------- 2 files changed, 80 insertions(+), 80 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index 99c92d15f0..51b6e87fea 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -24,11 +24,86 @@ qt { } } -macx-xcode:!isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) { - debug_information_format.name = DEBUG_INFORMATION_FORMAT - debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT - debug_information_format.build = debug - QMAKE_MAC_XCODE_SETTINGS += debug_information_format +macx-xcode { + !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) { + debug_information_format.name = DEBUG_INFORMATION_FORMAT + debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT + debug_information_format.build = debug + QMAKE_MAC_XCODE_SETTINGS += debug_information_format + } +} else { + uikit { + 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_LFLAGS_$${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 { + 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 + } + + QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) + QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) + QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS) } cache(QMAKE_XCODE_DEVELOPER_PATH, stash) diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf index 654d487600..68ab7e4053 100644 --- a/mkspecs/features/mac/sdk.prf +++ b/mkspecs/features/mac/sdk.prf @@ -47,78 +47,3 @@ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_ $$tool = $$sysrooted $$member(value, 1, -1) cache($$tool_variable, set stash, $$tool) } - -!equals(MAKEFILE_GENERATOR, XCODE) { - uikit { - 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_LFLAGS_$${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 { - 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 - } - - QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) - QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) - QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS) -} -- cgit v1.2.3 From b5c809eb96cc1348cee6083e7141fb1c505943f6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 23 Dec 2016 15:18:31 +0100 Subject: remove redundant arch list truncation in single_arch case beyond this point, simulator_archs is only used to determine from which one of the lists the remaining arch came from (and device_archs is actually never used again). the lists are assumed to be mutually exclusive, so truncating them won't affect in which of them the first element of their concatenation is found. Change-Id: I4736ed7e51f6623efa6bd37892ab1fcf8c83ae8b Reviewed-by: Jake Petroules --- mkspecs/features/mac/default_post.prf | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index 51b6e87fea..2ac4262129 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -48,11 +48,7 @@ macx-xcode { 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) - } + single_arch: archs = $$first(archs) for (arch, archs) { contains(simulator_archs, $$arch) { -- cgit v1.2.3 From 70a72768409a89e770e1279cfb3e8b59df21a11c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 23 Dec 2016 15:36:19 +0100 Subject: de-duplicate {mac,uikit}/default_post.prf re valid architectures Change-Id: Ie9d5a35a7f8578a2588ec004aab086d74986b0eb Reviewed-by: Jake Petroules --- mkspecs/features/mac/default_post.prf | 17 +++++++++-------- mkspecs/features/uikit/default_post.prf | 9 --------- 2 files changed, 9 insertions(+), 17 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index 2ac4262129..d93c6ed27c 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -37,21 +37,22 @@ macx-xcode { 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 + device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS + simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS + # Note: uikit/default_post.prf relies on this variable as well. + VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS - isEmpty(archs): \ + isEmpty(VALID_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: archs = $$first(archs) + single_arch: VALID_ARCHS = $$first(VALID_ARCHS) - for (arch, archs) { - contains(simulator_archs, $$arch) { + for (arch, VALID_ARCHS) { + contains(VALID_SIMULATOR_ARCHS, $$arch) { sdk = $$simulator.sdk version_identifier = $$simulator.deployment_identifier } else { @@ -78,7 +79,7 @@ macx-xcode { } QMAKE_CFLAGS_USE_PRECOMPILE = - for (arch, archs) { + for (arch, VALID_ARCHS) { QMAKE_CFLAGS_USE_PRECOMPILE += \ -Xarch_$${arch} \ -include${QMAKE_PCH_OUTPUT_$${arch}} diff --git a/mkspecs/features/uikit/default_post.prf b/mkspecs/features/uikit/default_post.prf index 6e23e23a6a..dc4effd7f1 100644 --- a/mkspecs/features/uikit/default_post.prf +++ b/mkspecs/features/uikit/default_post.prf @@ -68,15 +68,6 @@ macx-xcode { only_active_arch.build = debug QMAKE_MAC_XCODE_SETTINGS += only_active_arch } else { - VALID_ARCHS = - device|!simulator: VALID_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS - simulator: VALID_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS - - 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)) -- cgit v1.2.3 From 8292326f1bc986f8d87b9f3c244a5e0eb06563f9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 23 Dec 2016 15:48:54 +0100 Subject: configure: make library sources fail more verbosely log a message in all unsuccessful exit paths. Task-number: QTBUG-57217 Change-Id: I8b0f2685d327da583c3e42c8149327e05b2a66cc Reviewed-by: Lars Knoll --- mkspecs/features/qt_configure.prf | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 41bd75c45d..c20a9672e4 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -503,12 +503,16 @@ defineTest(qtConfLibrary_makeSpec) { # the library is found via pkg-config. defineTest(qtConfLibrary_pkgConfig) { pkg_config = $$qtConfPkgConfig($$eval($${1}.host)) - isEmpty(pkg_config): \ + isEmpty(pkg_config) { + qtLog("pkg-config use disabled globally.") return(false) + } args = $$qtConfPrepareArgs($$eval($${1}.args)) - !qtConfPkgConfigPackageExists($$pkg_config, $$args): \ + !qtConfPkgConfigPackageExists($$pkg_config, $$args) { + qtLog("pkg-config did not find package.") return(false) + } qtRunLoggedCommand("$$pkg_config --modversion $$args", version)|return(false) qtRunLoggedCommand("$$pkg_config --libs-only-L --libs-only-l $$args", $${1}.libs)|return(false) @@ -619,8 +623,9 @@ defineTest(qtConfHandleLibrary) { qtLog("Trying source $$s (type $$t) of library $${1} ...") - !$$qtConfEvaluate($$eval($${spfx}.condition)) { - qtLog(" => source failed condition.") + cond = $$eval($${spfx}.condition) + !$$qtConfEvaluate($$cond) { + qtLog(" => source failed condition '$$cond'.") next() } -- cgit v1.2.3 From 7549bbbacbdadacb283ae73ccb8b415a3dbe0c7c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 23 Dec 2016 16:26:50 +0100 Subject: fail early after command line parsing error we don't want to do the (possibly interactive) license check when the command line is not valid. Task-number: QTBUG-18459 Change-Id: I68c3b7ed4646e49865922ab5612f971930698356 Reviewed-by: Lars Knoll --- mkspecs/features/qt_configure.prf | 1 + 1 file changed, 1 insertion(+) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index c20a9672e4..e8bddbf09f 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1772,6 +1772,7 @@ for (currentConfig, allConfigs): \ QMAKE_SAVED_ARGS = $$QMAKE_EXTRA_ARGS QMAKE_REDO_CONFIG = false qtConfParseCommandLine() +qtConfCheckErrors() for (currentConfig, allConfigs) { qtConfSetModuleName() -- cgit v1.2.3 From 47784b4352351f042d1e3b61e7151cdcc7c0bac1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 23 Dec 2016 21:11:40 +0100 Subject: re-introduce config.summary Task-number: QTBUG-56225 Change-Id: I954cc1055ab0168c06b6618d02b06f63b4122add Reviewed-by: Lars Knoll --- mkspecs/features/qt_configure.prf | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index e8bddbf09f..ca66862abc 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1368,33 +1368,21 @@ defineTest(qtConfCreateSummary) { } defineTest(qtConfPrintReport) { - for (n, QT_CONFIGURE_REPORT): \ - logn($$n) - logn() - - for (n, QT_CONFIGURE_NOTES) { - logn($$n) - logn() - } - - for (w, QT_CONFIGURE_WARNINGS) { - logn($$w) - logn() - } + blocks = \ + "$$join(QT_CONFIGURE_REPORT, $$escape_expand(\\n))" \ + "$$join(QT_CONFIGURE_NOTES, $$escape_expand(\\n\\n))" \ + "$$join(QT_CONFIGURE_WARNINGS, $$escape_expand(\\n\\n))" !isEmpty(QT_CONFIGURE_ERRORS) { - for (e, QT_CONFIGURE_ERRORS) { - logn($$e) - logn() - } - mention_config_log:!$$QMAKE_CONFIG_VERBOSE { - logn("Check config.log for details.") - logn() - } - - !equals(config.input.continue, yes): \ - error() + blocks += "$$join(QT_CONFIGURE_ERRORS, $$escape_expand(\\n\\n))" + mention_config_log:!$$QMAKE_CONFIG_VERBOSE: \ + blocks += "Check config.log for details." } + blocks = "$$join(blocks, $$escape_expand(\\n\\n))" + logn($$blocks) + !isEmpty(QT_CONFIGURE_ERRORS):!equals(config.input.continue, yes): \ + error() + write_file($$OUT_PWD/config.summary, blocks)|error() } defineTest(qtConfCheckErrors) { -- cgit v1.2.3 From cfba3fff052b0af411d21727a68e78ea3e6a21d0 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 Jan 2017 16:59:36 +0100 Subject: move emission of final messages to qmake-based configure now qmake is the last command called by the unix configure script. as it happens, this was already the case in the windows script, but only because it didn't print these messages at all, which it implicitly does now. another effect of this is that repositories outside qtbase will now also get the installation note in modular builds, which makes sense. Change-Id: I567146936b216185a8e0f61e445222215608bf13 Reviewed-by: Lars Knoll --- mkspecs/features/configure_base.prf | 1 + mkspecs/features/qt_configure.prf | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/configure_base.prf b/mkspecs/features/configure_base.prf index 41f429e204..a4464528b4 100644 --- a/mkspecs/features/configure_base.prf +++ b/mkspecs/features/configure_base.prf @@ -19,6 +19,7 @@ QMAKE_MAKE = $$(MAKE) } else { error("Configure tests are not supported with the $$MAKEFILE_GENERATOR Makefile generator.") } +QMAKE_MAKE_NAME = $$basename(QMAKE_MAKE) # Make sure we don't inherit MAKEFLAGS - -i in particular is fatal. QMAKE_MAKE = "$${SETENV_PFX}MAKEFLAGS=$$SETENV_SFX $$QMAKE_MAKE" diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index ca66862abc..8eb8f22347 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1851,3 +1851,19 @@ for (p, QMAKE_POST_CONFIGURE): \ logn("Configure summary:") logn() qtConfPrintReport() + +# final notes for the user +logn() +logn("Qt is now configured for building. Just run '$$QMAKE_MAKE_NAME'.") +pfx = $$[QT_INSTALL_PREFIX] +equals(pfx, $$[QT_INSTALL_PREFIX/get]) { + logn("Once everything is built, Qt is installed.") + logn("You should NOT run '$$QMAKE_MAKE_NAME install'.") +} else { + logn("Once everything is built, you must run '$$QMAKE_MAKE_NAME install'.") + logn("Qt will be installed into '$$system_path($$pfx)'.") +} +logn() +logn("Prior to reconfiguration, make sure you remove any leftovers from") +logn("the previous build.") +logn() -- cgit v1.2.3 From d6778c3597a6e06b866c5b7a994cac4d71aaead3 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 Jan 2017 19:47:03 +0100 Subject: make skipping of configure in sub-repos less arcane this was introduced in 60e5a1c8 for no apparent reason. Change-Id: Idcbc6df3df4e4846c76b3e4215d753a1c97e2eec Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_configure.prf | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 8eb8f22347..7e2e5cfecc 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1698,16 +1698,18 @@ defineTest(qtConfProcessOutput) { # tie it all together # -cfgs = -isEmpty(_QMAKE_SUPER_CACHE_)|equals(OUT_PWD, $$dirname(_QMAKE_SUPER_CACHE_)) { - c = $$basename(_PRO_FILE_PWD_) - config.$${c}.dir = $$_PRO_FILE_PWD_ - cfgs += $$c - !isEmpty(_QMAKE_SUPER_CACHE_) { - for (s, SUBDIRS) { - config.$${s}.dir = $$_PRO_FILE_PWD_/$${s} - cfgs += $$s - } +!isEmpty(_QMAKE_SUPER_CACHE_):!equals(OUT_PWD, $$dirname(_QMAKE_SUPER_CACHE_)) { + # sub-repo within a top-level build; no need to configure anything. + return() +} + +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 = -- cgit v1.2.3 From 44a68aff6626d8e7beb040fe0d6dc52740e2a210 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 Jan 2017 19:51:52 +0100 Subject: name top-level configure scope after the project file ... instead of the directory it resides in, to make it independent of the user's fs layout. this makes logs more comparable, and little else. Change-Id: I0ab3e968dad74ef86577f388c8ca1557e3c17ce4 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_configure.prf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 7e2e5cfecc..f517e69496 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1703,9 +1703,8 @@ defineTest(qtConfProcessOutput) { return() } -c = $$basename(_PRO_FILE_PWD_) -config.$${c}.dir = $$_PRO_FILE_PWD_ -cfgs = $$c +config.$${TARGET}.dir = $$_PRO_FILE_PWD_ +cfgs = $$TARGET !isEmpty(_QMAKE_SUPER_CACHE_) { for (s, SUBDIRS) { config.$${s}.dir = $$_PRO_FILE_PWD_/$${s} -- cgit v1.2.3 From 696c3f9af852537897aa754dc269833ead9fcf41 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 Jan 2017 20:23:19 +0100 Subject: complain about various invalid configuration attempts Task-number: QTBUG-56049 Change-Id: Id5eeb014c2b88195d2d14566a62dcb9185206b37 Reviewed-by: Jake Petroules Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_configure.prf | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index f517e69496..3adefb743e 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1700,6 +1700,14 @@ defineTest(qtConfProcessOutput) { !isEmpty(_QMAKE_SUPER_CACHE_):!equals(OUT_PWD, $$dirname(_QMAKE_SUPER_CACHE_)) { # sub-repo within a top-level build; no need to configure anything. + !isEmpty(QMAKE_EXTRA_ARGS) { + # sub-projects don't get the extra args passed down automatically, + # so we can use their presence to detect misguided attempts to + # configure the repositories separately. + # caveat: a plain qmake call is indistinguishable from a recursion + # (by design), so we cannot detect this case. + error("You cannot configure $$TARGET separately within a top-level build.") + } return() } @@ -1717,8 +1725,11 @@ for (c, cfgs) { exists($$s/configure.json): \ configsToProcess += $$c } -isEmpty(configsToProcess): \ +isEmpty(configsToProcess) { + !isEmpty(QMAKE_EXTRA_ARGS): \ + error("This module does not accept configure command line arguments.") return() +} load(configure_base) -- cgit v1.2.3 From 9576b71fe8c0dea978f4bcbe15526e0e3e643cfd Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 6 Dec 2016 17:27:50 +0100 Subject: import static plugins also into dlls static plugins must be actually linked into the target whenever it is not a static library itself. apart from fixing qml plugin linkage, this also provides a more generic fix for the already fixed linking of activeqt controls. Task-number: QTBUG-28215 Task-number: QTBUG-55279 Change-Id: I9661369bf3dfc6bcf3a5ed563e6716eb3ef6e76e Reviewed-by: Joerg Bornemann --- mkspecs/features/qt.prf | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index bfa6c7988d..a4e3b0247d 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -45,6 +45,9 @@ qaxserver { QT += axserver } +!force_import_plugins:!contains(TEMPLATE, ".*app"):!if(contains(TEMPLATE, ".*lib"):dll): \ + CONFIG -= import_plugins + # target variable, flag source variable defineTest(qtProcessModuleFlags) { for(flag, $$2) { @@ -191,9 +194,9 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.") QMAKE_RPATHLINKDIR *= $$unique(rpaths) } -# static builds: link qml import plugins into the app. +# static builds: link qml import plugins into the target. contains(qt_module_deps, qml): \ - qtConfig(static):contains(TEMPLATE, .*app):!host_build:!no_import_scan { + qtConfig(static):import_plugins:!host_build:!no_import_scan { exists($$[QT_INSTALL_QML/get]): \ QMLPATHS *= $$[QT_INSTALL_QML/get] @@ -249,7 +252,7 @@ contains(qt_module_deps, qml): \ QTPLUGIN.platforms = qminimal } -contains(TEMPLATE, .*app) { +import_plugins { autoplugs = for (qtmod, qt_module_deps) { for (ptype, QT.$${qtmod}.plugin_types) { @@ -282,7 +285,6 @@ contains(TEMPLATE, .*app) { } qtConfig(static) { - force_import_plugins|contains(TEMPLATE, .*app) { import_plugins:!isEmpty(QTPLUGIN) { IMPORT_FILE_CONT = \ "// This file is autogenerated by qmake. It imports static plugin classes for" \ @@ -300,7 +302,6 @@ qtConfig(static) { GENERATED_SOURCES += $$IMPORT_CPP QMAKE_DISTCLEAN += $$IMPORT_CPP } - } for (QTPLUG, $$list($$lower($$unique(QTPLUGIN)))) { # Check if the plugin is known to Qt. We can use this to determine -- cgit v1.2.3 From ac740d9d285a73e98c99495769782a0d5b934d7a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 20 Dec 2016 18:43:00 +0100 Subject: statically link plugins for transitive deps' private deps as well while we already linked the plugins for our own private deps, we failed to do so for our transitive deps. this also fixes linking qml plugins if qml is linked only indirectly and privately. the code for setting up rpath-link is slightly refactored as a side effect, with no functional change. the code for setting up rpath now also sees the longer list of dependencies, but that's irrelevant, as qtcore always ends up among the direct deps anyway iff any non-bootstrapped modules are used. Change-Id: I90dca81a2836c6191ce5d092e16bf7660ee820bc Reviewed-by: Joerg Bornemann --- mkspecs/features/qt.prf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index a4e3b0247d..564f3d774d 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -168,10 +168,10 @@ for(ever) { } qt_module_deps = $$CLEAN_QT $$CLEAN_QT_PRIVATE -qt_module_deps = $$resolve_depends(qt_module_deps, "QT.") +all_qt_module_deps = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_depends") !no_qt_rpath:!static:qtConfig(rpath):!qtConfig(static):\ - contains(qt_module_deps, core) { + contains(all_qt_module_deps, core) { relative_qt_rpath:!isEmpty(QMAKE_REL_RPATH_BASE):contains(INSTALLS, target):\ isEmpty(target.files):isEmpty(target.commands):isEmpty(target.extra) { # NOT the /dev property, as INSTALLS use host paths @@ -186,8 +186,8 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.") # libraries which were NOT specified on the command line. # This means that paths of direct dependencies (QT & QT_PRIVATE) # don't need to be listed, unlike their private dependencies' paths. - privdep = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_depends") - privdep -= $$qt_module_deps + privdep = $$all_qt_module_deps + privdep -= $$resolve_depends(qt_module_deps, "QT.") rpaths = for(dep, privdep): \ rpaths += $$eval(QT.$${dep}.libs) @@ -195,7 +195,7 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.") } # static builds: link qml import plugins into the target. -contains(qt_module_deps, qml): \ +contains(all_qt_module_deps, qml): \ qtConfig(static):import_plugins:!host_build:!no_import_scan { exists($$[QT_INSTALL_QML/get]): \ QMLPATHS *= $$[QT_INSTALL_QML/get] @@ -254,14 +254,14 @@ contains(qt_module_deps, qml): \ import_plugins { autoplugs = - for (qtmod, qt_module_deps) { + for (qtmod, all_qt_module_deps) { for (ptype, QT.$${qtmod}.plugin_types) { nptype = $$replace(ptype, [-/], _) isEmpty(QTPLUGIN.$$nptype) { for (plug, QT_PLUGINS) { equals(QT_PLUGIN.$${plug}.TYPE, $$ptype) { for (dep, QT_PLUGIN.$${plug}.EXTENDS) { - !contains(qt_module_deps, $$dep) { + !contains(all_qt_module_deps, $$dep) { plug = break() } -- cgit v1.2.3 From 623b191c10ad36a82e31b8af794b6e04ae18775f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 20 Dec 2016 20:20:35 +0100 Subject: track plugins' qt dependencies plugins may pull in additional qt modules which may require additional plugins in turn. Change-Id: I22264b39c1397666b2dc9079048ed1fc64aa84d9 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt.prf | 148 +++++++++++++++++++++++------------------ mkspecs/features/qt_plugin.prf | 4 ++ 2 files changed, 88 insertions(+), 64 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 564f3d774d..626cf9c809 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -45,9 +45,93 @@ qaxserver { QT += axserver } +!import_qpa_plugin { + warning("CONFIG-=import_qpa_plugin is deprecated. Use QTPLUGIN.platforms=- instead.") + QTPLUGIN.platforms = - +} else: qpa_minimal_plugin { + warning("CONFIG+=qpa_minimal_plugin is deprecated. Use QTPLUGIN.platforms=qminimal instead.") + QTPLUGIN.platforms = qminimal +} + !force_import_plugins:!contains(TEMPLATE, ".*app"):!if(contains(TEMPLATE, ".*lib"):dll): \ CONFIG -= import_plugins +# qmake variables cannot contain dashes, so normalize the names first +CLEAN_QT = $$replace(QT, -private$, _private) +CLEAN_QT_PRIVATE = $$replace(QT_PRIVATE, -private$, _private) + +qt_module_deps = $$CLEAN_QT $$CLEAN_QT_PRIVATE +all_qt_module_deps = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_depends") + +import_plugins:qtConfig(static) { + manualplugs = $$QTPLUGIN # User may specify plugins. Mostly legacy. + autoplugs = # Auto-added plugins. + # First round: explicitly specified modules. + plugin_deps = $$all_qt_module_deps + for(ever) { + # Automatically link the default plugins for the linked Qt modules. + for (qtmod, plugin_deps) { + for (ptype, QT.$${qtmod}.plugin_types) { + nptype = $$replace(ptype, [-/], _) + isEmpty(QTPLUGIN.$$nptype) { + for (plug, QT_PLUGINS) { + equals(QT_PLUGIN.$${plug}.TYPE, $$ptype) { + for (dep, QT_PLUGIN.$${plug}.EXTENDS) { + !contains(all_qt_module_deps, $$dep) { + plug = + break() + } + } + autoplugs += $$plug + } + } + } else { + plug = $$eval(QTPLUGIN.$$nptype) + !equals(plug, -): \ + autoplugs += $$plug + } + } + } + QTPLUGIN = $$manualplugs $$autoplugs + QTPLUGIN = $$unique(QTPLUGIN) + + # Obtain the plugins' Qt dependencies ... + plugin_deps = + for (plug, QTPLUGIN): \ + plugin_deps += $$eval(QT_PLUGIN.$${plug}.DEPENDS) + plugin_deps = $$resolve_depends(plugin_deps, "QT.", ".depends" ".run_depends") + plugin_deps -= $$all_qt_module_deps + isEmpty(plugin_deps): \ + break() + # ... and start over if any new Qt modules appeared, + # as these may want to load plugins in turn. + all_qt_module_deps += $$plugin_deps + } + extraplugs = $$manualplugs + manualplugs -= $$autoplugs + extraplugs -= $$manualplugs + !isEmpty(extraplugs): \ + warning("Redundant entries in QTPLUGIN: $$extraplugs") + + !isEmpty(QTPLUGIN) { + IMPORT_FILE_CONT = \ + "// This file is autogenerated by qmake. It imports static plugin classes for" \ + "// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS. variables." \ + "$${LITERAL_HASH}include " + for (plug, QTPLUGIN) { + plug_class = $$eval(QT_PLUGIN.$${plug}.CLASS_NAME) + !isEmpty(plug_class): \ + IMPORT_FILE_CONT += "Q_IMPORT_PLUGIN($$plug_class)" + else: \ + warning("Plugin class name could not be determined for plugin '$$plug'.") + } + IMPORT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_plugin_import.cpp + write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error() + GENERATED_SOURCES += $$IMPORT_CPP + QMAKE_DISTCLEAN += $$IMPORT_CPP + } +} + # target variable, flag source variable defineTest(qtProcessModuleFlags) { for(flag, $$2) { @@ -62,8 +146,6 @@ defineTest(qtProcessModuleFlags) { unset(using_privates) var_sfx = for(ever) { - # qmake variables cannot contain dashes, so normalize the names first - CLEAN_QT$$var_sfx = $$replace(QT$$var_sfx, -private$, _private) # Topological resolution of modules based on their QT..depends variable FULL_QT$$var_sfx = $$resolve_depends(CLEAN_QT$$var_sfx, "QT.") # Finally actually add the modules @@ -167,9 +249,6 @@ for(ever) { message("This is not a bug, but a result of using Qt internals. You have been warned!") } -qt_module_deps = $$CLEAN_QT $$CLEAN_QT_PRIVATE -all_qt_module_deps = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_depends") - !no_qt_rpath:!static:qtConfig(rpath):!qtConfig(static):\ contains(all_qt_module_deps, core) { relative_qt_rpath:!isEmpty(QMAKE_REL_RPATH_BASE):contains(INSTALLS, target):\ @@ -243,66 +322,7 @@ contains(all_qt_module_deps, qml): \ QMAKE_DISTCLEAN += $$QML_IMPORT_CPP } } - -!import_qpa_plugin { - warning("CONFIG-=import_qpa_plugin is deprecated. Use QTPLUGIN.platforms=- instead.") - QTPLUGIN.platforms = - -} else: qpa_minimal_plugin { - warning("CONFIG+=qpa_minimal_plugin is deprecated. Use QTPLUGIN.platforms=qminimal instead.") - QTPLUGIN.platforms = qminimal -} - -import_plugins { - autoplugs = - for (qtmod, all_qt_module_deps) { - for (ptype, QT.$${qtmod}.plugin_types) { - nptype = $$replace(ptype, [-/], _) - isEmpty(QTPLUGIN.$$nptype) { - for (plug, QT_PLUGINS) { - equals(QT_PLUGIN.$${plug}.TYPE, $$ptype) { - for (dep, QT_PLUGIN.$${plug}.EXTENDS) { - !contains(all_qt_module_deps, $$dep) { - plug = - break() - } - } - autoplugs += $$plug - } - } - } else { - plug = $$eval(QTPLUGIN.$$nptype) - !equals(plug, -): \ - autoplugs += $$plug - } - } - } - manualplugs = $$QTPLUGIN - manualplugs -= $$autoplugs - QTPLUGIN -= $$manualplugs - !isEmpty(QTPLUGIN): \ - warning("Redundant entries in QTPLUGIN: $$QTPLUGIN") - QTPLUGIN = $$manualplugs $$autoplugs -} - qtConfig(static) { - import_plugins:!isEmpty(QTPLUGIN) { - IMPORT_FILE_CONT = \ - "// This file is autogenerated by qmake. It imports static plugin classes for" \ - "// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS. variables." \ - "$${LITERAL_HASH}include " - for(IMPORT_PLUG, $$list($$unique(QTPLUGIN))) { - PLUG_CLASS = $$eval(QT_PLUGIN.$${IMPORT_PLUG}.CLASS_NAME) - !isEmpty(PLUG_CLASS): \ - IMPORT_FILE_CONT += "Q_IMPORT_PLUGIN($$PLUG_CLASS)" - else: \ - warning("Plugin class name could not be determined for $$IMPORT_PLUG plugin.") - } - IMPORT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_plugin_import.cpp - write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error() - GENERATED_SOURCES += $$IMPORT_CPP - QMAKE_DISTCLEAN += $$IMPORT_CPP - } - for (QTPLUG, $$list($$lower($$unique(QTPLUGIN)))) { # Check if the plugin is known to Qt. We can use this to determine # the plugin path. Unknown plugins must rely on the default link path. diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf index 265b4ea8a2..80d9c87e05 100644 --- a/mkspecs/features/qt_plugin.prf +++ b/mkspecs/features/qt_plugin.prf @@ -44,9 +44,13 @@ CONFIG(static, static|shared)|prefix_build { MODULE_FWD_PRI = $$mod_work_pfx/qt_plugin_$${MODULE}.pri !build_pass { + qt_plugin_deps = $$QT $$QT_PRIVATE + qt_plugin_deps = s,-private$,_private,g + MODULE_PRI_CONT = \ "QT_PLUGIN.$${MODULE}.TYPE = $$PLUGIN_TYPE" \ "QT_PLUGIN.$${MODULE}.EXTENDS =$$join(PLUGIN_EXTENDS, " ", " ")" \ + "QT_PLUGIN.$${MODULE}.DEPENDS = $$qt_plugin_deps" \ "QT_PLUGIN.$${MODULE}.CLASS_NAME = $$PLUGIN_CLASS_NAME" \ "QT_PLUGINS += $$MODULE" write_file($$MODULE_PRI, MODULE_PRI_CONT)|error() -- cgit v1.2.3 From 342691b80294f8096dd383f9a0a7b4488f40728e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 5 Jan 2017 14:28:41 +0100 Subject: fix configure --opt=val syntax the second dash would end up in the option name, which made it obviously unrecognizable. but the second dash isn't optional in the first place (as evidenced one line up), so remove the question marks. Task-number: QTBUG-57908 Change-Id: I6622fef7d11d7b3c485f16698349d1912037a41e Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_configure.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 3adefb743e..a0948dad86 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -241,8 +241,8 @@ defineTest(qtConfParseCommandLine) { opt = $$replace(c, "^--?(disable|no)-(.*)", "\\2") val = no } else: contains(c, "^--([^=]+)=(.*)") { - opt = $$replace(c, "^--?([^=]+)=(.*)", "\\1") - val = $$replace(c, "^--?([^=]+)=(.*)", "\\2") + opt = $$replace(c, "^--([^=]+)=(.*)", "\\1") + val = $$replace(c, "^--([^=]+)=(.*)", "\\2") } else: contains(c, "^--(.*)") { opt = $$replace(c, "^--(.*)", "\\1") val = yes -- cgit v1.2.3 From 117b3e1b8f43bea829b818e4c20645e8a8d1e8e6 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 17 Jan 2017 12:50:07 +0100 Subject: qt_targets.prf: Don't unconditionally set product and description Check on QMAKE_TARGET_PRODUCT/QMAKE_TARGET_DESCRIPTION before assigning values. This enables providing other values by for example the Qt tool applications. Change-Id: I62270ca38b7a9110185f6163b280409dbaf395f6 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qt_targets.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_targets.prf b/mkspecs/features/qt_targets.prf index 72429526a7..69e39170cc 100644 --- a/mkspecs/features/qt_targets.prf +++ b/mkspecs/features/qt_targets.prf @@ -1,4 +1,4 @@ QMAKE_TARGET_COMPANY = The Qt Company Ltd -QMAKE_TARGET_PRODUCT = Qt5 -QMAKE_TARGET_DESCRIPTION = C++ application development framework. +isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5 +isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ application development framework. QMAKE_TARGET_COPYRIGHT = Copyright (C) 2015 The Qt Company Ltd. -- cgit v1.2.3 From 5a628fdb98cf6d9fddb890069f7a8d327bdafadf Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 17 Jan 2017 12:55:11 +0100 Subject: qt_targets.prf: Bump copyright year Change-Id: I371fbc28abd6b0e3497e94b7d974fef5d20c7acc Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qt_targets.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_targets.prf b/mkspecs/features/qt_targets.prf index 69e39170cc..cd76efdaf3 100644 --- a/mkspecs/features/qt_targets.prf +++ b/mkspecs/features/qt_targets.prf @@ -1,4 +1,4 @@ QMAKE_TARGET_COMPANY = The Qt Company Ltd isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5 isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ application development framework. -QMAKE_TARGET_COPYRIGHT = Copyright (C) 2015 The Qt Company Ltd. +QMAKE_TARGET_COPYRIGHT = Copyright (C) 2017 The Qt Company Ltd. -- cgit v1.2.3 From f2e39c4a154b109b9308ab657a1ce64cff6ab176 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 9 Jan 2017 15:44:30 +0100 Subject: inline "committing" of configure command line built-ins the options may need to take effect before the regular test processing commences (which is actually going to be the case in the next commit). the indirection via the callback only obfuscated the code anyway. Change-Id: I5307b0be15cf4cc2c2db391ce5b5a93f81076b5c Reviewed-by: Joerg Bornemann --- mkspecs/features/data/configure.json | 7 ------- mkspecs/features/qt_configure.prf | 19 ++++++------------- 2 files changed, 6 insertions(+), 20 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/data/configure.json b/mkspecs/features/data/configure.json index 8e5ff5f0a4..98ccde1ee3 100644 --- a/mkspecs/features/data/configure.json +++ b/mkspecs/features/data/configure.json @@ -14,12 +14,5 @@ "redo": { "type": "redo" } } - - }, - - "features": { - "builtins": { - "output": [ "builtins" ] - } } } diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index a0948dad86..5e444f62b2 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1601,19 +1601,6 @@ defineTest(qtConfOutput_privateFeature) { } } -# command line built-ins post-processing -defineTest(qtConfOutput_builtins) { - QMAKE_CONFIG_VERBOSE = $$eval(config.input.verbose) - isEmpty(QMAKE_CONFIG_VERBOSE): \ - QMAKE_CONFIG_VERBOSE = false - export(QMAKE_CONFIG_VERBOSE) - - QMAKE_CONFIG_CACHE_USE = $$eval(config.input.cache_use) - isEmpty(QMAKE_CONFIG_CACHE_USE): \ - QMAKE_CONFIG_CACHE_USE = all - export(QMAKE_CONFIG_CACHE_USE) -} - defineTest(qtConfProcessOneOutput) { feature = $${1} fpfx = $${currentConfig}.features.$${feature} @@ -1786,6 +1773,9 @@ qtConfCheckErrors() QMAKE_CONFIG_CACHE = $$dirname(_QMAKE_SUPER_CACHE_)/config.cache else: \ QMAKE_CONFIG_CACHE = $$dirname(_QMAKE_CACHE_)/config.cache +QMAKE_CONFIG_CACHE_USE = $$eval(config.input.cache_use) +isEmpty(QMAKE_CONFIG_CACHE_USE): \ + QMAKE_CONFIG_CACHE_USE = all !equals(QMAKE_CONFIG_CACHE_USE, none) { include($$QMAKE_CONFIG_CACHE, , true) # this crudely determines when to discard the cache. this also catches the case @@ -1800,6 +1790,9 @@ equals(QMAKE_CONFIG_CACHE_USE, none) { write_file($$QMAKE_CONFIG_CACHE, cont) } +QMAKE_CONFIG_VERBOSE = $$eval(config.input.verbose) +isEmpty(QMAKE_CONFIG_VERBOSE): \ + QMAKE_CONFIG_VERBOSE = false QMAKE_CONFIG_LOG = $$OUT_PWD/config.log !equals(QMAKE_CONFIG_CACHE_USE, all): \ write_file($$QMAKE_CONFIG_LOG, "") -- cgit v1.2.3 From 068fca3ceca5ef8669902c7cf7b70588e3d74256 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 9 Jan 2017 15:38:24 +0100 Subject: log configure command line to config.log that makes the log file mostly self-contained. for code re-use, the qtSystemQuote() function was factored out. Change-Id: Ie3469518ba384131b69f5f15c577240e2674d507 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_configure.prf | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 5e444f62b2..ee323501f9 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -183,7 +183,9 @@ defineTest(qtConfCommandline_redo) { qtConfAddError("No config.opt present - cannot redo configuration.") return() } - QMAKE_EXTRA_ARGS = $$cat($$OUT_PWD/config.opt, lines) $$QMAKE_EXTRA_ARGS + QMAKE_EXTRA_REDO_ARGS = $$cat($$OUT_PWD/config.opt, lines) + export(QMAKE_EXTRA_REDO_ARGS) # just for config.log + QMAKE_EXTRA_ARGS = $$QMAKE_EXTRA_REDO_ARGS $$QMAKE_EXTRA_ARGS export(QMAKE_EXTRA_ARGS) QMAKE_REDO_CONFIG = true export(QMAKE_REDO_CONFIG) @@ -387,14 +389,17 @@ defineTest(qtConfPkgConfigPackageExists) { return(true) } -defineReplace(qtConfPrepareArgs) { - arglist = $$split(1) +defineReplace(qtSystemQuote) { args = - for (a, arglist): \ + for (a, 1): \ args += $$system_quote($$a) return($$args) } +defineReplace(qtConfPrepareArgs) { + return($$qtSystemQuote($$split(1))) +} + defineTest(qtConfSetupLibraries) { for (l, $${currentConfig}.libraries._KEYS_) { lpfx = $${currentConfig}.libraries.$${l} @@ -1796,6 +1801,9 @@ isEmpty(QMAKE_CONFIG_VERBOSE): \ QMAKE_CONFIG_LOG = $$OUT_PWD/config.log !equals(QMAKE_CONFIG_CACHE_USE, all): \ write_file($$QMAKE_CONFIG_LOG, "") +qtLog("Command line: $$qtSystemQuote($$QMAKE_SAVED_ARGS)") +$$QMAKE_REDO_CONFIG: \ + qtLog("config.opt: $$qtSystemQuote($$QMAKE_EXTRA_REDO_ARGS)") CONFIG += qt_conf_tests_allowed logn() -- cgit v1.2.3 From 9c05ccb6bc89d9ca3fa76daebf15ac3a3c9fd95a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 9 Jan 2017 16:00:08 +0100 Subject: put some empty lines between configure runs into config.log Change-Id: I6c3e3b139752bb9d1b60c590bb1ea72ae2e4fbdf Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_configure.prf | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index ee323501f9..4056b4d05a 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1801,6 +1801,8 @@ isEmpty(QMAKE_CONFIG_VERBOSE): \ QMAKE_CONFIG_LOG = $$OUT_PWD/config.log !equals(QMAKE_CONFIG_CACHE_USE, all): \ write_file($$QMAKE_CONFIG_LOG, "") +else: \ + write_file($$QMAKE_CONFIG_LOG, $$list($$escape_expand(\\n)), append) qtLog("Command line: $$qtSystemQuote($$QMAKE_SAVED_ARGS)") $$QMAKE_REDO_CONFIG: \ qtLog("config.opt: $$qtSystemQuote($$QMAKE_EXTRA_REDO_ARGS)") -- cgit v1.2.3 From a4e4f8918183608a0449c5d60622e6b355b8dbbd Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 20 Dec 2016 20:20:39 +0100 Subject: fix up static linking of plugins somewhat move the code before the linking of qt modules - dependency resolution would re-order them anyway (or static linking would fail). on the way, fix up the coding style and rename some variables. the code to de-duplicate/normalize QTPLUGIN is pulled ahead, which means that the automatic plugin importing wouldn't make a mess of it any more. but this is mostly legacy anyway. Change-Id: Id135470d027f5d84b7f30531425a65efa230f278 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt.prf | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 626cf9c809..3ccbbe7061 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -63,6 +63,8 @@ CLEAN_QT_PRIVATE = $$replace(QT_PRIVATE, -private$, _private) qt_module_deps = $$CLEAN_QT $$CLEAN_QT_PRIVATE all_qt_module_deps = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_depends") +QTPLUGIN = $$unique($$list($$lower($$QTPLUGIN))) + import_plugins:qtConfig(static) { manualplugs = $$QTPLUGIN # User may specify plugins. Mostly legacy. autoplugs = # Auto-added plugins. @@ -132,6 +134,22 @@ import_plugins:qtConfig(static) { } } +# Only link against plugins in static builds +!isEmpty(QTPLUGIN):qtConfig(static) { + for (plug, QTPLUGIN) { + # Check if the plugin is known to Qt. We can use this to determine + # the plugin path. Unknown plugins must rely on the default link path. + plug_type = $$eval(QT_PLUGIN.$${plug}.TYPE) + !isEmpty(plug_type) { + plug_path = $$eval(QT_PLUGIN.$${plug}.PATH) + isEmpty(plug_path): \ + plug_path = $$[QT_INSTALL_PLUGINS/get] + LIBS += -L$$plug_path/$$plug_type + } + LIBS += -l$${plug}$$qtPlatformTargetSuffix() + } +} + # target variable, flag source variable defineTest(qtProcessModuleFlags) { for(flag, $$2) { @@ -322,24 +340,3 @@ contains(all_qt_module_deps, qml): \ QMAKE_DISTCLEAN += $$QML_IMPORT_CPP } } -qtConfig(static) { - for (QTPLUG, $$list($$lower($$unique(QTPLUGIN)))) { - # Check if the plugin is known to Qt. We can use this to determine - # the plugin path. Unknown plugins must rely on the default link path. - QT_PLUGINPATH = $$eval(QT_PLUGIN.$${QTPLUG}.TYPE) - - # Generate the plugin linker line - QT_LINKAGE = -l$${QTPLUG}$$qtPlatformTargetSuffix() - - # Only link against plugin in static builds - { - !isEmpty(QT_PLUGINPATH) { - plugpath = $$eval(QT_PLUGIN.$${QTPLUG}.PATH) - isEmpty(plugpath): \ - plugpath = $$[QT_INSTALL_PLUGINS/get] - LIBS *= -L$$plugpath/$$QT_PLUGINPATH - } - LIBS += $$QT_LINKAGE - } - } -} -- cgit v1.2.3 From 6834d0eeccc7333ab9d53251b3bd4a24058843da Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 17 Jan 2017 17:10:21 +0100 Subject: prevent configure from putting garbage into .qmake.stash in cross-builds, toolchain.prf was loaded before CROSS_COMPILE was set up, leading to caching of possibly nonsensical values. this change also necessitated that msvc-version.conf is loaded only when toolchain.prf is, which is best done by loading the former from within the latter. that seems quite appropriate in the first place. Change-Id: I62577e827a75e335e03df016bd1aa1932643fd6c Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- mkspecs/features/toolchain.prf | 2 ++ mkspecs/features/win32/default_pre.prf | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf index d71f40b831..fdefd513e3 100644 --- a/mkspecs/features/toolchain.prf +++ b/mkspecs/features/toolchain.prf @@ -153,3 +153,5 @@ unset(target_prefix) QMAKE_CFLAGS += $$QMAKE_CFLAGS_MSVC_COMPAT QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_MSVC_COMPAT + +msvc:!intel_icl:!clang_cl: include(../common/msvc-version.conf) diff --git a/mkspecs/features/win32/default_pre.prf b/mkspecs/features/win32/default_pre.prf index 11160f5b5c..bdb72c0d89 100644 --- a/mkspecs/features/win32/default_pre.prf +++ b/mkspecs/features/win32/default_pre.prf @@ -1,3 +1,2 @@ CONFIG = rtti_off incremental_off windows $$CONFIG load(default_pre) -msvc:!intel_icl:!clang_cl: include(../../common/msvc-version.conf) -- cgit v1.2.3 From f67afee9e932dd220474227882a745233455d729 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 12 Jan 2017 20:52:51 +0100 Subject: determine QMAKE_DEFAULT_{INC,LIB}DIRS separately for host and target note that in principle this leaves room for a race condition, as the first project to determine the host config is not going to be the top-level one. in qtbase and qtdeclarative, this is naturally serialized via the common bootstrapped libraries (bootstrap resp. qmldevtools). activeqt, qt3d, qtscxml, and qtwayland all build only one bootstrapped tool each. qtwebengine makes a fake host build to create files for gyp/gn; the convert_dict tool is declared a host tool, but isn't actually built when x-building anyway, and even if, it's serialized on the former. qttools needs explicit serialization, though. no other host builds exist within qt as of now. Task-number: QTBUG-58126 Change-Id: I81a02a2d98f2bfe5d6aaa51119d5e7919549f119 Reviewed-by: Joerg Bornemann --- mkspecs/features/toolchain.prf | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf index fdefd513e3..9e11ab9958 100644 --- a/mkspecs/features/toolchain.prf +++ b/mkspecs/features/toolchain.prf @@ -12,7 +12,12 @@ defineReplace(qtMakeExpand) { } } -isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build { +host_build: \ + target_prefix = QMAKE_HOST_CXX +else: \ + target_prefix = QMAKE_CXX + +isEmpty($${target_prefix}.INCDIRS) { # # Get default include and library paths from compiler # @@ -44,6 +49,8 @@ isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build { } QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS) } else: msvc { + # This doesn't differentiate between host and target, + # but neither do the compilers. LIB = $$getenv("LIB") QMAKE_DEFAULT_LIBDIRS = $$split(LIB, $$QMAKE_DIRLIST_SEP) INCLUDE = $$getenv("INCLUDE") @@ -55,8 +62,11 @@ isEmpty(QMAKE_DEFAULT_INCDIRS):!host_build { isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib } - !isEmpty(QMAKE_DEFAULT_INCDIRS): cache(QMAKE_DEFAULT_INCDIRS, set stash) - !isEmpty(QMAKE_DEFAULT_LIBDIRS): cache(QMAKE_DEFAULT_LIBDIRS, set stash) + cache($${target_prefix}.INCDIRS, set stash, QMAKE_DEFAULT_INCDIRS) + cache($${target_prefix}.LIBDIRS, set stash, QMAKE_DEFAULT_LIBDIRS) +} else { + QMAKE_DEFAULT_INCDIRS = $$eval($${target_prefix}.INCDIRS) + QMAKE_DEFAULT_LIBDIRS = $$eval($${target_prefix}.LIBDIRS) } # @@ -73,11 +83,6 @@ defineReplace(qtVariablesFromGCC) { return($$system("$$1 -E $$system_quote($$PWD/data/macros.cpp) <$$null_device 2>$$null_device", lines)) } -host_build: \ - target_prefix = QMAKE_HOST_CXX -else: \ - target_prefix = QMAKE_CXX - isEmpty($${target_prefix}.COMPILER_MACROS) { msvc { clang_cl { -- cgit v1.2.3 From 6b8666c7f24acd13246c51eeee1316dd95ab1860 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 12 Jan 2017 20:58:45 +0100 Subject: don't separate host and target toolchain when not x-building there isn't a point to determining the values separately if they are actually the same things. Change-Id: I74cd2bf39e96d559630709559602c234c38b0c47 Reviewed-by: Joerg Bornemann --- mkspecs/features/toolchain.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf index 9e11ab9958..15b0829235 100644 --- a/mkspecs/features/toolchain.prf +++ b/mkspecs/features/toolchain.prf @@ -12,7 +12,7 @@ defineReplace(qtMakeExpand) { } } -host_build: \ +cross_compile:host_build: \ target_prefix = QMAKE_HOST_CXX else: \ target_prefix = QMAKE_CXX -- cgit v1.2.3 From d9203fa534f31509e87bb6c6c702c1b7149372e3 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Tue, 22 Nov 2016 13:14:53 +0100 Subject: winrt: Add support for Visual Studio 2017 Tested with RC Task-number: QTBUG-57086 Change-Id: I57ecfd0751538dcba41ebaf028de1bc5b4debbb7 Reviewed-by: Maurice Kalinowski --- mkspecs/features/winrt/default_pre.prf | 2 +- mkspecs/features/winrt/package_manifest.prf | 6 ++--- mkspecs/winrt-x64-msvc2017/qmake.conf | 20 +++++++++++++++ mkspecs/winrt-x64-msvc2017/qplatformdefs.h | 40 +++++++++++++++++++++++++++++ mkspecs/winrt-x86-msvc2017/qmake.conf | 19 ++++++++++++++ mkspecs/winrt-x86-msvc2017/qplatformdefs.h | 40 +++++++++++++++++++++++++++++ 6 files changed, 123 insertions(+), 4 deletions(-) create mode 100644 mkspecs/winrt-x64-msvc2017/qmake.conf create mode 100644 mkspecs/winrt-x64-msvc2017/qplatformdefs.h create mode 100644 mkspecs/winrt-x86-msvc2017/qmake.conf create mode 100644 mkspecs/winrt-x86-msvc2017/qplatformdefs.h (limited to 'mkspecs') diff --git a/mkspecs/features/winrt/default_pre.prf b/mkspecs/features/winrt/default_pre.prf index f397ef3d61..f79d04ce41 100644 --- a/mkspecs/features/winrt/default_pre.prf +++ b/mkspecs/features/winrt/default_pre.prf @@ -1,4 +1,4 @@ -*msvc2015 { +*msvc2015|*msvc2017 { # 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 diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf index e7859a7cae..e0e421ed9a 100644 --- a/mkspecs/features/winrt/package_manifest.prf +++ b/mkspecs/features/winrt/package_manifest.prf @@ -94,7 +94,7 @@ isEmpty(WINRT_MANIFEST.background): WINRT_MANIFEST.background = green isEmpty(WINRT_MANIFEST.foreground): WINRT_MANIFEST.foreground = light isEmpty(WINRT_MANIFEST.default_language): WINRT_MANIFEST.default_language = en - *-msvc2015 { + *-msvc2015|*-msvc2017 { isEmpty(WINRT_MANIFEST.minVersion): WINRT_MANIFEST.minVersion = $$(UCRTVersion) isEmpty(WINRT_MANIFEST.minVersion): error("No UCRTVersion found in environment.")) isEmpty(WINRT_MANIFEST.maxVersionTested): WINRT_MANIFEST.maxVersionTested = $$WINRT_MANIFEST.minVersion @@ -118,7 +118,7 @@ # All Windows 10 applications need to have internetClient. It is also not marked as additional # capability anymore and is assumed to be standard. - *-msvc2015: WINRT_MANIFEST.capabilities += internetClient + *-msvc2015|*-msvc2017: WINRT_MANIFEST.capabilities += internetClient contains(WINRT_MANIFEST.capabilities, defaults) { WINRT_MANIFEST.capabilities -= defaults @@ -145,7 +145,7 @@ } # Dependencies are given as a string list. The CRT dependency is added automatically above. - # For MSVC2015 the dependencies are added in conjunction with TargetDeviceFamily + # For MSVC2015/2017 the dependencies are added in conjunction with TargetDeviceFamily # Due to the hard coded dependency on "Windows.Universal" the tag # is already inside the MSVC2015 manifest. WINRT_MANIFEST.dependencies = $$unique(WINRT_MANIFEST.dependencies) diff --git a/mkspecs/winrt-x64-msvc2017/qmake.conf b/mkspecs/winrt-x64-msvc2017/qmake.conf new file mode 100644 index 0000000000..cb2209fa23 --- /dev/null +++ b/mkspecs/winrt-x64-msvc2017/qmake.conf @@ -0,0 +1,20 @@ +# +# qmake configuration for winrt-x64-msvc2017 +# +# Written for Microsoft Visual C++ 2017 +# + +include(../common/winrt_winphone/qmake.conf) +DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__ + +QMAKE_CFLAGS += -FS +QMAKE_CXXFLAGS += -FS +QMAKE_LFLAGS += /MACHINE:X64 /NODEFAULTLIB:kernel32.lib + +QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib + +VCPROJ_ARCH = x64 +WINSDK_VER = 10.0 +WINTARGET_VER = winv10.0 +WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in +WINRT_MANIFEST.architecture = x64 diff --git a/mkspecs/winrt-x64-msvc2017/qplatformdefs.h b/mkspecs/winrt-x64-msvc2017/qplatformdefs.h new file mode 100644 index 0000000000..2a1aef5e88 --- /dev/null +++ b/mkspecs/winrt-x64-msvc2017/qplatformdefs.h @@ -0,0 +1,40 @@ +/**************************************************************************** +** +** 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/winrt_winphone/qplatformdefs.h" diff --git a/mkspecs/winrt-x86-msvc2017/qmake.conf b/mkspecs/winrt-x86-msvc2017/qmake.conf new file mode 100644 index 0000000000..3c9506bbad --- /dev/null +++ b/mkspecs/winrt-x86-msvc2017/qmake.conf @@ -0,0 +1,19 @@ +# +# qmake configuration for winrt-x86-msvc2017 +# +# Written for Microsoft Visual C++ 2017 +# + +include(../common/winrt_winphone/qmake.conf) +DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__ + +QMAKE_CFLAGS += -FS +QMAKE_CXXFLAGS += -FS +QMAKE_LFLAGS += /SAFESEH /MACHINE:X86 /NODEFAULTLIB:kernel32.lib + +QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib +VCPROJ_ARCH = Win32 +WINSDK_VER = 10.0 +WINTARGET_VER = winv10.0 +WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in +WINRT_MANIFEST.architecture = x86 diff --git a/mkspecs/winrt-x86-msvc2017/qplatformdefs.h b/mkspecs/winrt-x86-msvc2017/qplatformdefs.h new file mode 100644 index 0000000000..2a1aef5e88 --- /dev/null +++ b/mkspecs/winrt-x86-msvc2017/qplatformdefs.h @@ -0,0 +1,40 @@ +/**************************************************************************** +** +** 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/winrt_winphone/qplatformdefs.h" -- cgit v1.2.3 From 8f960badfcf3afdf2d489dfb7ccc96a656ae0f9d Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 20 Jan 2017 09:45:13 +0100 Subject: Don't ignore major version "0" when resolving targets on windows This was missed in dd9ec1564, leading to errors for example when building with separate_debug_info. Change-Id: Ibeb8020abe32690bcc691c1ca139508775c91db2 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/resolve_target.prf | 1 - 1 file changed, 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf index 629a02a4f3..d5ba70ca8c 100644 --- a/mkspecs/features/resolve_target.prf +++ b/mkspecs/features/resolve_target.prf @@ -19,7 +19,6 @@ win32 { contains(TEMPLATE, .*lib) { !skip_target_version_ext:isEmpty(TARGET_VERSION_EXT):!isEmpty(VERSION) { TARGET_VERSION_EXT = $$section(VERSION, ., 0, 0) - isEqual(TARGET_VERSION_EXT, 0):unset(TARGET_VERSION_EXT) } static:TARGET_EXT = .lib else:TARGET_EXT = .dll -- cgit v1.2.3 From 5060740fa980fdd5d2828b3b7e8956386266a7eb Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 19 Jan 2017 21:54:41 +0100 Subject: utilize configure results better in native builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit don't ignore detected features for host tools when we're not actually cross-building. Change-Id: Id62a3c1c6b7ae422b14efb4fbea0892b05a047cc Reviewed-by: Thiago Macieira Reviewed-by: René J.V. Bertin --- mkspecs/features/default_post.prf | 2 +- mkspecs/features/qt_common.prf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index e7e9a5bd87..7f5ab3a10c 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -60,7 +60,7 @@ debug { } # disable special linker flags for host builds (no proper test for host support yet) -!host_build { +!host_build|!cross_compile { use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD enable_new_dtags: QMAKE_LFLAGS += $$QMAKE_LFLAGS_NEW_DTAGS } diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index 7967697eb4..2dfc22f16e 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -17,7 +17,7 @@ qtConfig(c++14): CONFIG += c++14 qtConfig(c++1z): CONFIG += c++1z contains(TEMPLATE, .*lib) { # module and plugins - !host_build:qtConfig(reduce_exports): CONFIG += hide_symbols + if(!host_build|!cross_compile):qtConfig(reduce_exports): CONFIG += hide_symbols unix:qtConfig(reduce_relocations): CONFIG += bsymbolic_functions qtConfig(separate_debug_info): CONFIG += separate_debug_info -- cgit v1.2.3 From a828a02d9f86b5b1d472768a5a52f963c6ff8175 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 20 Jan 2017 09:47:13 +0100 Subject: Fix sanity checks in DRIVE CX and Jetson K1 Pro specs This amends e58eb3d6. Task-number: QTBUG-58287 Change-Id: Ia4b5d0cf5f71d1e0977e3c8674ef08929112f7e9 Reviewed-by: Oswald Buddenhagen --- mkspecs/devices/linux-drive-cx-g++/qmake.conf | 10 ++++++++-- mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/devices/linux-drive-cx-g++/qmake.conf b/mkspecs/devices/linux-drive-cx-g++/qmake.conf index 985f8626ad..a658f29deb 100644 --- a/mkspecs/devices/linux-drive-cx-g++/qmake.conf +++ b/mkspecs/devices/linux-drive-cx-g++/qmake.conf @@ -16,8 +16,6 @@ include(../common/linux_device_pre.conf) -isEmpty(VIBRANTE_SDK_TOPDIR):error("You must pass -device-option VIBRANTE_SDK_TOPDIR=/path/to/sdk") - QMAKE_INCDIR += \ $${VIBRANTE_SDK_TOPDIR}/include \ $$[QT_SYSROOT]/usr/include @@ -43,4 +41,12 @@ COMPILER_FLAGS += -mtune=cortex-a57.cortex-a53 -march=armv8-a EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice include(../common/linux_arm_device_post.conf) + +# override the default from linux_arm_device_post.conf +defineTest(qtConfSanitizeMkspec) { + isEmpty(VIBRANTE_SDK_TOPDIR): \ + error("You must pass -device-option VIBRANTE_SDK_TOPDIR=/path/to/sdk") + deviceSanityCheckCompiler() +} + load(qt_config) diff --git a/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf b/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf index 31aacad99f..1f44c47151 100644 --- a/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf +++ b/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf @@ -14,8 +14,6 @@ include(../common/linux_device_pre.conf) -isEmpty(VIBRANTE_SDK_TOPDIR):error("You must pass -device-option VIBRANTE_SDK_TOPDIR=/path/to/sdk") - QMAKE_INCDIR += \ $${VIBRANTE_SDK_TOPDIR}/include \ $$[QT_SYSROOT]/usr/include @@ -38,4 +36,12 @@ COMPILER_FLAGS += -mtune=cortex-a15 -march=armv7-a -mfpu=neon-vfpv EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice include(../common/linux_arm_device_post.conf) + +# override the default from linux_arm_device_post.conf +defineTest(qtConfSanitizeMkspec) { + isEmpty(VIBRANTE_SDK_TOPDIR): \ + error("You must pass -device-option VIBRANTE_SDK_TOPDIR=/path/to/sdk") + deviceSanityCheckCompiler() +} + load(qt_config) -- cgit v1.2.3 From 00593d8e3713fb83001637d3794d26fe83bd6144 Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Sun, 22 Jan 2017 16:09:00 +0100 Subject: features/resources.prf: fix use of unescaped backslash Without this, building a project with qmake -Wall will always produce the following warning: mkspecs/features/resources.prf:22: Unescaped backslashes are deprecated Change-Id: I0aeedbf470958ab458651a263e3f804ea2d1a0f0 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/resources.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf index adc8e9a8ac..de769b4b86 100644 --- a/mkspecs/features/resources.prf +++ b/mkspecs/features/resources.prf @@ -19,7 +19,7 @@ defineReplace(xml_escape) { RESOURCES += qmake_immediate for(resource, RESOURCES) { # Regular case of user qrc file - contains(resource, ".*\.qrc$"): \ + contains(resource, ".*\\.qrc$"): \ next() # Fallback for stand-alone files/directories -- cgit v1.2.3