diff options
Diffstat (limited to 'mkspecs')
33 files changed, 625 insertions, 338 deletions
diff --git a/mkspecs/common/linux-android.conf b/mkspecs/common/linux-android.conf index fec008cb45..b8e052d1ec 100644 --- a/mkspecs/common/linux-android.conf +++ b/mkspecs/common/linux-android.conf @@ -6,7 +6,6 @@ QMAKE_PLATFORM += android include(linux.conf) include(gcc-base-unix.conf) -DEFINES += QT_NO_PRINTER QT_NO_PRINTDIALOG QT_QPA_DEFAULT_PLATFORM = minimal NDK_ROOT = $$(ANDROID_NDK_ROOT) diff --git a/mkspecs/common/uikit.conf b/mkspecs/common/uikit.conf index daedaa46cd..de0fb33351 100644 --- a/mkspecs/common/uikit.conf +++ b/mkspecs/common/uikit.conf @@ -6,6 +6,6 @@ QMAKE_PLATFORM += uikit CONFIG += bitcode reduce_exports shallow_bundle no_qt_rpath INCLUDEPATH += $$PWD/uikit -DEFINES += DARWIN_NO_CARBON QT_NO_PRINTER QT_NO_PRINTDIALOG +DEFINES += DARWIN_NO_CARBON include(mac.conf) diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf index b5e0c7cc71..05c9bd39a5 100644 --- a/mkspecs/common/winrt_winphone/qmake.conf +++ b/mkspecs/common/winrt_winphone/qmake.conf @@ -10,8 +10,7 @@ MAKEFILE_GENERATOR = MSBUILD QMAKE_COMPILER = msvc QMAKE_PLATFORM = winrt win32 CONFIG = package_manifest $$CONFIG incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target rtti -DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT Q_BYTE_ORDER=Q_LITTLE_ENDIAN \ - QT_NO_PRINTER QT_NO_PRINTDIALOG # TODO: Remove when printing is re-enabled +DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT Q_BYTE_ORDER=Q_LITTLE_ENDIAN DEPLOYMENT_PLUGIN += qwinrt diff --git a/mkspecs/devices/linux-colibri-vf-g++/qmake.conf b/mkspecs/devices/linux-colibri-vf-g++/qmake.conf new file mode 100644 index 0000000000..bc42f67f8a --- /dev/null +++ b/mkspecs/devices/linux-colibri-vf-g++/qmake.conf @@ -0,0 +1,17 @@ +# +# qmake configuration for the NXP Colibri VFxx boards +# + +include(../common/linux_device_pre.conf) + +VFXX_CFLAGS = -march=armv7-a -mtune=cortex-a5 -mfpu=neon +QMAKE_CFLAGS += $$VFXX_CFLAGS +QMAKE_CXXFLAGS += $$VFXX_CFLAGS + +QT_QPA_DEFAULT_PLATFORM = linuxfb + +DISTRO_OPTS += hard-float + +include(../common/linux_arm_device_post.conf) + +load(qt_config) diff --git a/mkspecs/devices/linux-colibri-vf-g++/qplatformdefs.h b/mkspecs/devices/linux-colibri-vf-g++/qplatformdefs.h new file mode 100644 index 0000000000..6a35ed45d5 --- /dev/null +++ b/mkspecs/devices/linux-colibri-vf-g++/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 "../../linux-g++/qplatformdefs.h" diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf index bd53e31a04..f275e3ac06 100644 --- a/mkspecs/features/configure.prf +++ b/mkspecs/features/configure.prf @@ -1,5 +1,7 @@ load(configure_base) +isEmpty(QMAKE_CONFIG_TESTS_DIR): QMAKE_CONFIG_TESTS_DIR = $$_PRO_FILE_PWD_/config.tests + # Try to build the test project in $$QMAKE_CONFIG_TESTS_DIR/$$1 # ($$_PRO_FILE_PWD_/config.tests/$$1 by default). # diff --git a/mkspecs/features/configure_base.prf b/mkspecs/features/configure_base.prf index 08edba4b1c..dc630a3528 100644 --- a/mkspecs/features/configure_base.prf +++ b/mkspecs/features/configure_base.prf @@ -43,8 +43,6 @@ defineTest(qtRunLoggedCommand) { return(true) } -isEmpty(QMAKE_CONFIG_TESTS_DIR): QMAKE_CONFIG_TESTS_DIR = $$_PRO_FILE_PWD_/config.tests - # Ensure that a cache is present. If none was found on startup, this will create # one in the build directory of the project which loads this feature. cache() diff --git a/mkspecs/features/ctest_testcase_common.prf b/mkspecs/features/ctest_testcase_common.prf index 40e41900e8..af80fc00a1 100644 --- a/mkspecs/features/ctest_testcase_common.prf +++ b/mkspecs/features/ctest_testcase_common.prf @@ -69,6 +69,7 @@ for (dep, dependentmodules): \ mod_deps += $$cmakeModuleName($$dep) dependentmodules = $$join(mod_deps, ";") +QT_FOR_CONFIG += gui-private qtConfig(angle): CMAKE_GL_DEFINES = -DQT_WITH_ANGLE=True !qtConfig(egl): CMAKE_GL_DEFINES += -DNO_EGL=True diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf index 5abc741b90..0d43fbe5a1 100644 --- a/mkspecs/features/mac/sdk.prf +++ b/mkspecs/features/mac/sdk.prf @@ -24,12 +24,6 @@ QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path) QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath) QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion) -!equals(MAKEFILE_GENERATOR, XCODE) { - QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH - QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH - QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH -} - sysrootified = for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val QMAKE_INCDIR_OPENGL = $$sysrootified @@ -56,20 +50,72 @@ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_ !equals(MAKEFILE_GENERATOR, XCODE) { uikit:!host_buildĀ { - simulator: \ - version_identifier = $$simulator.deployment_identifier - else: \ - version_identifier = $$device.deployment_identifier ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET + + !simulator|simulator_and_device: device_archs = $$QMAKE_APPLE_DEVICE_ARCHS + simulator: simulator_archs = $$QMAKE_APPLE_SIMULATOR_ARCHS + archs = $$device_archs $$simulator_archs + + QMAKE_XARCH_CFLAGS = + QMAKE_XARCH_LFLAGS = + QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS + + single_arch { + device_archs = $$first(device_archs) + simulator_archs = $$first(simulator_archs) + archs = $$first(archs) + } + + for(arch, archs) { + contains(simulator_archs, $$arch) { + sdk = $$simulator.sdk + version_identifier = $$simulator.deployment_identifier + } else { + sdk = $$device.sdk + version_identifier = $$device.deployment_identifier + } + + version_min_flags = \ + -Xarch_$${arch} \ + -m$${version_identifier}-version-min=$$deployment_target + QMAKE_XARCH_CFLAGS_$${arch} = $$version_min_flags \ + -Xarch_$${arch} \ + -isysroot$$xcodeSDKInfo(Path, $$sdk) + QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \ + -Xarch_$${arch} \ + -Wl,-syslibroot,$$xcodeSDKInfo(Path, $$sdk) + + QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch}) + QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch}) + + QMAKE_EXTRA_VARIABLES += \ + QMAKE_XARCH_CFLAGS_$${arch} \ + QMAKE_XARCH_LFLAGS_$${arch} + } + + QMAKE_CFLAGS_USE_PRECOMPILE = + for(arch, archs) { + QMAKE_CFLAGS_USE_PRECOMPILE += \ + -Xarch_$${arch} \ + -include${QMAKE_PCH_OUTPUT_$${arch}} + } + QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + + QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT} } else: osx { version_identifier = macosx deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET + version_min_flag = -m$${version_identifier}-version-min=$$deployment_target + QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag + QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag + QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH $$version_min_flag } - version_min_flag = -m$${version_identifier}-version-min=$$deployment_target - QMAKE_CFLAGS += $$version_min_flag - QMAKE_CXXFLAGS += $$version_min_flag - QMAKE_LFLAGS += $$version_min_flag + QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) + QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) + QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS) } diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index 73fbc8c29b..4c81ee5c74 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -25,8 +25,9 @@ win32:count(MOC_INCLUDEPATH, 40, >) { } # QNX's compiler sets "gcc" config, but does not support the -dM option; -# iOS builds are multi-arch, so this feature cannot possibly work. -if(gcc|intel_icl|msvc):!rim_qcc:!ios { +# UIKit builds are always multi-arch due to simulator_and_device (unless +# -sdk is used) so this feature cannot possibly work. +if(gcc|intel_icl|msvc):!rim_qcc:!uikit { moc_predefs.CONFIG = no_link gcc: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -dM -E -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} else:intel_icl: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -QdM -P -Fi${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} diff --git a/mkspecs/features/qfeatures.prf b/mkspecs/features/qfeatures.prf deleted file mode 100644 index 15ef5c5be0..0000000000 --- a/mkspecs/features/qfeatures.prf +++ /dev/null @@ -1,4 +0,0 @@ -# This file needs to be loaded explicitly, as the evaluation is relatively -# expensive, and not many projects will actually need it. -QMAKE_QT_FEATURES = $$[QT_HOST_DATA/get]/mkspecs/qfeatures.pri -include($$QMAKE_QT_FEATURES) | error("Failed to load $$QMAKE_QT_FEATURES") diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index e0e8ef9f51..95e63ecae0 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -95,3 +95,26 @@ defineTest(qtNomakeTools) { export($${d}.CONFIG) } } + +# This overloads the same function from qt_functions.prf. +# This is not in qt_module.prf, as that gets loaded too late. +defineTest(qtConfig) { + modules = $$QT $$QT_PRIVATE $$QT_FOR_PRIVATE $$QT_FOR_CONFIG + modules ~= s,-private$,_private,g + modules = $$resolve_depends(modules, "QT.", ".depends") + isEmpty(MODULE): \ + MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0) + exists($$OUT_PWD/qt$${MODULE}-config.pri) { + include($$OUT_PWD/qt$${MODULE}-config.pri) + modules += $${MODULE} $${MODULE}_private + } + modules += global global_private + modules = $$reverse(modules) + for (module, modules) { + contains(QT.$${module}.enabled_features, $$1): \ + return(true) + contains(QT.$${module}.disabled_features, $$1): \ + return(false) + } + error("Could not find feature $${1}.") +} diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index e754a17790..d30983f62b 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -68,12 +68,12 @@ warnings_are_errors:warning_clean { # If the module declares that it has does its clean-up of warnings, enable -Werror. # This setting is compiler-dependent anyway because it depends on the version of the # compiler. - clang:!uikit { - # Apple clang 4.0-4.2,5.0-5.1,6.0-6.4 + clang { + # Apple clang 4.0-4.2,5.0-5.1,6.0-6.4,7.0-7.3 # Regular clang 3.3-3.9 apple_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION} reg_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION} - contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]")|contains(reg_ver, "3\\.[3-9]") { + contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]|7\\.[0123]")|contains(reg_ver, "3\\.[3-9]") { QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR } } else:intel_icc:linux { diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 536ae2cd8a..e34d7ad194 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1,8 +1,3 @@ -CONFIG -= qt debug_and_release -load(configure_base) - -QMAKE_CONFIG_CACHE = $$dirname(_QMAKE_CACHE_)/config.cache -QMAKE_CONFIG_CACHE_USE = all QT_CONFIGURE_REPORT = QT_CONFIGURE_NOTES = @@ -36,8 +31,8 @@ defineTest(qtConfAddError) { defineTest(qtConfCommandlineSetInput) { arg = $${1} val = $${2} - !isEmpty(config.commandline.options.$${arg}.name): \ - arg = $$eval(config.commandline.options.$${arg}.name) + !isEmpty($${currentConfig}.commandline.options.$${arg}.name): \ + arg = $$eval($${currentConfig}.commandline.options.$${arg}.name) config.input.$$arg = $$val export(config.input.$$arg) @@ -74,7 +69,7 @@ defineTest(qtConfCommandline_void) { return() } - val = $$eval(config.commandline.options.$${opt}.value) + val = $$eval($${currentConfig}.commandline.options.$${opt}.value) isEmpty(val): val = yes qtConfCommandlineSetInput($$opt, $$val) @@ -86,11 +81,11 @@ defineTest(qtConfCommandline_enum) { isEmpty(val): val = yes # validate and map value - mapped = $$eval(config.commandline.options.$${opt}.values.$${val}) + mapped = $$eval($${currentConfig}.commandline.options.$${opt}.values.$${val}) isEmpty(mapped) { # just a list of allowed values - for (i, config.commandline.options.$${opt}.values._KEYS_) { - equals(config.commandline.options.$${opt}.values.$${i}, $$val) { + for (i, $${currentConfig}.commandline.options.$${opt}.values._KEYS_) { + equals($${currentConfig}.commandline.options.$${opt}.values.$${i}, $$val) { mapped = $$val break() } @@ -108,12 +103,12 @@ defineTest(qtConfValidateValue) { opt = $${1} val = $${2} - validValues = $$eval(config.commandline.options.$${opt}.values._KEYS_) + validValues = $$eval($${currentConfig}.commandline.options.$${opt}.values._KEYS_) isEmpty(validValues): \ return(true) for (i, validValues) { - equals(config.commandline.options.$${opt}.values.$${i}, $$val): \ + equals($${currentConfig}.commandline.options.$${opt}.values.$${i}, $$val): \ return(true) } @@ -169,20 +164,24 @@ defineTest(qtConfCommandline_addString) { !qtConfValidateValue($$opt, $$val): \ return() - !isEmpty(config.commandline.options.$${opt}.name): \ - opt = $$eval(config.commandline.options.$${opt}.name) + !isEmpty($${currentConfig}.commandline.options.$${opt}.name): \ + opt = $$eval($${currentConfig}.commandline.options.$${opt}.name) config.input.$$opt += $$val export(config.input.$$opt) } defineTest(qtConfParseCommandLine) { - custom = $$config.commandline.custom - customCall = - !isEmpty(custom) { - customCall = qtConfCommandline_$$custom - !defined($$customCall, test): \ - error("Custom command line callback '$$custom' is undefined.") + customCalls = + for (cc, allConfigs) { + custom = $$eval($${cc}.commandline.custom) + + !isEmpty(custom) { + customCall = qtConfCommandline_$$custom + !defined($$customCall, test): \ + error("Custom command line callback '$$custom' is undefined.") + customCalls += $$customCall + } } for (ever) { @@ -212,15 +211,24 @@ defineTest(qtConfParseCommandLine) { next() } - !isEmpty(customCall) { - $${customCall}($$c): \ - next() + didCustomCall = false + for (customCall, customCalls) { + $${customCall}($$c) { + didCustomCall = true + break() + } } + $$didCustomCall: \ + next() contains(c, "([A-Z_]+)=(.*)") { opt = $$replace(c, "^([A-Z_]+)=(.*)", "\\1") val = $$replace(c, "^([A-Z_]+)=(.*)", "\\2") - var = $$eval(config.commandline.assignments.$${opt}) + for (cc, allConfigs) { + var = $$eval($${cc}.commandline.assignments.$${opt}) + !isEmpty(var): \ + break() + } isEmpty(var) { qtConfAddError("Assigning unknown variable '$$opt' on command line.") return() @@ -254,25 +262,43 @@ defineTest(qtConfParseCommandLine) { return() } - type = $$eval(config.commandline.options.$${opt}) - isEmpty(type): \ - type = $$eval(config.commandline.options.$${opt}.type) - isEmpty(type) { - # no match in the regular options, try matching the prefixes - for (p, config.commandline.prefix._KEYS_) { - e = "^-$${p}(.*)" - contains(c, $$e) { - opt = $$eval(config.commandline.prefix.$${p}) - val = $$replace(c, $$e, "\\1") - type = "addString" - break() + for (cc, allConfigs) { + type = $$eval($${cc}.commandline.options.$${opt}) + isEmpty(type): \ + type = $$eval($${cc}.commandline.options.$${opt}.type) + isEmpty(type) { + # no match in the regular options, try matching the prefixes + for (p, $${cc}.commandline.prefix._KEYS_) { + e = "^-$${p}(.*)" + contains(c, $$e) { + opt = $$eval($${cc}.commandline.prefix.$${p}) + val = $$replace(c, $$e, "\\1") + type = "addString" + break() + } } } + !isEmpty(type) { + currentConfig = $$cc + break() + } } # handle builtin [-no]-feature-xxx isEmpty(type):contains(opt, "feature-(.*)") { - # simply skip for now - next() + opt ~= s,^feature-,, + found = false + for (cc, allConfigs) { + contains($${cc}.features._KEYS_, $$opt) { + found = true + break() + } + } + !$$found { + qtConfAddError("Enabling/Disabling unknown feature '$$opt'.") + return() + } + # this is a boolean enabling/disabling the corresponding feature + type = boolean } isEmpty(type) { @@ -368,8 +394,8 @@ defineReplace(qtConfPrepareArgs) { } defineTest(qtConfSetupLibraries) { - for (l, config.libraries._KEYS_) { - lpfx = config.libraries.$${l} + for (l, $${currentConfig}.libraries._KEYS_) { + lpfx = $${currentConfig}.libraries.$${l} # 'export' may be omitted, in which case it falls back to the library's name !defined($${lpfx}.export, var) { $${lpfx}.export = $$l @@ -396,8 +422,8 @@ defineTest(qtConfSetupLibraries) { } # reverse mapping for assignments on command line. - for (a, config.commandline.assignments._KEYS_) { - apfx = config.commandline.assignments.$${a} + for (a, $${currentConfig}.commandline.assignments._KEYS_) { + apfx = $${currentConfig}.commandline.assignments.$${a} ra = config.commandline.rev_assignments.$$eval($$apfx) $$ra = $$a export($$ra) @@ -487,12 +513,13 @@ defineTest(qtConfLibrary_pkgConfig) { return(false) qtRunLoggedCommand("$$pkg_config --modversion $$args", version)|return(false) - qtRunLoggedCommand("$$pkg_config --libs $$args", $${1}.libs)|return(false) + qtRunLoggedCommand("$$pkg_config --libs-only-L --libs-only-l $$args", $${1}.libs)|return(false) qtRunLoggedCommand("$$pkg_config --cflags $$args", $${1}.cflags)|return(false) qtRunLoggedCommand("$$pkg_config --cflags-only-I $$args", includes)|return(false) eval(includes = $$includes) includes ~= s/^-I//g $${1}.includedir = "$$val_escape(includes)" + version ~= s/[^0-9.].*$// $${1}.version = $$first(version) export($${1}.libs) export($${1}.cflags) @@ -569,10 +596,12 @@ defineTest(qtConfExportLibrary) { qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_MINOR, $$member(version, 1)) qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_PATCH, $$member(version, 2)) } + !isEmpty($${currentConfig}.module): \ + qtConfExtendVar($$output, "QT.$${currentModule}_private.libraries", $$2) } defineTest(qtConfHandleLibrary) { - lpfx = config.libraries.$$1 + lpfx = $${currentConfig}.libraries.$$1 defined($${lpfx}.result, var): return() qtConfEnsureTestTypeDeps("library") @@ -646,10 +675,10 @@ defineTest(qtConfTest_library) { defineTest(qtConfTestPrepare_compile) { for (u, $$list($$eval($${1}.use))) { - !contains(config.libraries._KEYS_, $$u): \ + !contains($${currentConfig}.libraries._KEYS_, $$u): \ error("Test $$1 tries to use undeclared library '$$u'") qtConfHandleLibrary($$u) - lpfx = config.libraries.$${u} + lpfx = $${currentConfig}.libraries.$${u} isEmpty($${lpfx}.source): \ return(false) $${1}.literal_args += $$qtConfLibraryArgs($${lpfx}.sources.$$eval($${lpfx}.source)) @@ -760,17 +789,17 @@ defineTest(logn) { } defineTest(qtLogTestIntro) { - description = $$eval($${1}.description) - isEmpty(description): return() + label = $$eval($${1}.label) + isEmpty(label): return() - msg = "Checking for $${description}... " + msg = "Checking for $${label}... " log($$msg) $$QMAKE_CONFIG_VERBOSE: log("$$escape_expand(\\n)") write_file($$QMAKE_CONFIG_LOG, msg, append) } defineTest(qtLogTestResult) { - isEmpty($${1}.description): return() + isEmpty($${1}.label): return() !isEmpty($${1}.log) { field = $$eval($${1}.log) @@ -819,12 +848,12 @@ defineTest(qtConfIsBoolean) { } defineTest(qtConfSetupTestTypeDeps) { - for (tt, config.testTypeDependencies._KEYS_) { + for (tt, $${currentConfig}.testTypeDependencies._KEYS_) { !defined(qtConfTest_$${tt}, test): \ error("Declaring dependency for undefined test type '$$tt'.") - for (f, config.testTypeDependencies.$${tt}._KEYS_) { - feature = $$eval(config.testTypeDependencies.$${tt}.$${f}) - isEmpty(config.features.$${feature}._KEYS_): \ + for (f, $${currentConfig}.testTypeDependencies.$${tt}._KEYS_) { + feature = $$eval($${currentConfig}.testTypeDependencies.$${tt}.$${f}) + isEmpty($${currentConfig}.features.$${feature}._KEYS_): \ error("Test type '$$tt' depends on undefined feature '$$feature'.") } } @@ -833,31 +862,31 @@ defineTest(qtConfSetupTestTypeDeps) { # the call to another one. The former representation is more natural # (and concise) to write, while the latter is more efficient to process. # Hence, this function inverts the mapping. - for (tt, config.testTypeAliases._KEYS_) { + for (tt, $${currentConfig}.testTypeAliases._KEYS_) { !defined(qtConfTest_$${tt}, test): \ error("Aliasing undefined test type '$$tt'.") - for (tta, config.testTypeAliases.$${tt}._KEYS_) { - type = $$eval(config.testTypeAliases.$${tt}.$${tta}) + for (tta, $${currentConfig}.testTypeAliases.$${tt}._KEYS_) { + type = $$eval($${currentConfig}.testTypeAliases.$${tt}.$${tta}) !defined(qtConfTest_$${type}, test): \ error("Aliasing '$$tt' to undefined test type '$$type'.") - config.testTypeForwards.$${type} += $$tt - export(config.testTypeForwards.$${type}) + $${currentConfig}.testTypeForwards.$${type} += $$tt + export($${currentConfig}.testTypeForwards.$${type}) } } } defineTest(qtConfEnsureTestTypeDeps) { - depsn = config.testTypeDependencies.$${1}._KEYS_ + depsn = $${currentConfig}.testTypeDependencies.$${1}._KEYS_ !isEmpty($$depsn) { for (dep, $$depsn) { - feature = $$eval(config.testTypeDependencies.$${1}.$${dep}) + feature = $$eval($${currentConfig}.testTypeDependencies.$${1}.$${dep}) !qtConfCheckFeature($$feature): \ error("Test type '$$1' depends on non-emitted feature $${feature}.") } $$depsn = export($$depsn) } - fwdsn = config.testTypeForwards.$${1} + fwdsn = $${currentConfig}.testTypeForwards.$${1} !isEmpty($$fwdsn) { for (fwd, $$fwdsn): \ qtConfEnsureTestTypeDeps($$fwd) @@ -867,7 +896,7 @@ defineTest(qtConfEnsureTestTypeDeps) { } defineTest(qtRunSingleTest) { - tpfx = config.tests.$${1} + tpfx = $${currentConfig}.tests.$${1} defined($${tpfx}.result, var): \ return() @@ -944,10 +973,10 @@ defineReplace(qtConfEvaluateSingleExpression) { var = $$section(e, ".", 2, -1) isEmpty(var): \ var = result - !contains(config.tests._KEYS_, $$test): \ + !contains($${currentConfig}.tests._KEYS_, $$test): \ error("Unknown test object $${test} in expression '$${1}'.") qtRunSingleTest($$test) - result = $$eval(config.tests.$${test}.$${var}) + result = $$eval($${currentConfig}.tests.$${test}.$${var}) } else: contains(e, "^libs\..*") { !qt_conf_tests_allowed: \ error("Expression '$${1}' refers to a library, which is not allowed at this stage of configuring.") @@ -955,22 +984,36 @@ defineReplace(qtConfEvaluateSingleExpression) { var = $$section(e, ".", 2, -1) isEmpty(var): \ var = result - !contains(config.libraries._KEYS_, $$lib): \ + !contains($${currentConfig}.libraries._KEYS_, $$lib): \ error("Unknown library object $${lib} in expression '$${1}'.") qtConfHandleLibrary($$lib) - !defined(config.libraries.$${lib}.$${var}, var): \ - var = sources.$$eval(config.libraries.$${lib}.$${source}).$$var - result = $$eval(config.libraries.$${lib}.$${var}) + !defined($${currentConfig}.libraries.$${lib}.$${var}, var): \ + var = sources.$$eval($${currentConfig}.libraries.$${lib}.$${source}).$$var + result = $$eval($${currentConfig}.libraries.$${lib}.$${var}) } else: contains(e, "^features\..*") { feature = $$section(e, ".", 1, 1) var = $$section(e, ".", 2, -1) isEmpty(var): \ var = available - !contains(config.features._KEYS_, $$feature): \ + !contains($${currentConfig}.features._KEYS_, $$feature) { + # this is basically a copy of what qtConfig() in qt_build_config.prf + # does, but we produce a nicer error message. + for (module, QMAKE_CONFIG_DEPS) { + contains(QT.$${module}.enabled_features, $$feature): \ + result = true + else: contains(QT.$${module}.disabled_features, $$feature): \ + result = false + else: \ + next() + !equals(var, available): \ + error("Expression '$$1' is accessing field '$$var' of non-local feature $${feature}.") + return($$result) + } error("Unknown feature object $${feature} in expression '$${1}'.") + } !qtConfCheckFeature($$feature): \ error("Expression '$$1' is accessing non-emitted feature $${feature}.") - result = $$eval(config.features.$${feature}.$${var}) + result = $$eval($${currentConfig}.features.$${feature}.$${var}) } else: contains(e, "^config\..*") { var = $$replace(e, "^config\.", "") result = false @@ -1058,7 +1101,7 @@ defineReplace(qtConfEvaluateSubExpression) { } defineReplace(qtIsFeatureEnabled) { - enable = $$eval(config.features.$${1}.enable) + enable = $$eval($${currentConfig}.features.$${1}.enable) !isEmpty(enable) { $$qtConfEvaluate($$enable): \ return(true) @@ -1071,7 +1114,7 @@ defineReplace(qtIsFeatureEnabled) { } defineReplace(qtIsFeatureDisabled) { - disable = $$eval(config.features.$${1}.disable) + disable = $$eval($${currentConfig}.features.$${1}.disable) !isEmpty(disable) { $$qtConfEvaluate($$disable): \ return(true) @@ -1099,7 +1142,7 @@ defineReplace(qtConfCheckSingleCondition) { } defineTest(qtConfCheckFeature) { - fpfx = config.features.$${1} + fpfx = $${currentConfig}.features.$${1} available = $$eval($${fpfx}.available) !isEmpty(available): return(true) @@ -1137,7 +1180,7 @@ defineTest(qtConfCheckFeature) { $${fpfx}.available = $$result export($${fpfx}.available) - for (i, config.features.$${feature}.output._KEYS_): \ + for (i, $${currentConfig}.features.$${feature}.output._KEYS_): \ qtConfProcessOneOutput($$feature, $$i) return(true) @@ -1145,7 +1188,7 @@ defineTest(qtConfCheckFeature) { defineTest(qtConfProcessFeatures) { - for (feature, config.features._KEYS_): \ + for (feature, $${currentConfig}.features._KEYS_): \ qtConfCheckFeature($$feature) } @@ -1166,8 +1209,8 @@ defineTest(qtConfReportPadded) { defineReplace(qtConfCollectFeatures) { l = for (feature, $$list($${1})) { - $$eval(config.features.$${feature}.available): \ - l += $$eval(config.features.$${feature}.description) + $$eval($${currentConfig}.features.$${feature}.available): \ + l += $$eval($${currentConfig}.features.$${feature}.label) } isEmpty(l): return("<none>") @@ -1180,10 +1223,10 @@ defineTest(qtConfReport_featureList) { defineReplace(qtConfFindFirstAvailableFeature) { for (feature, $$list($${1})) { - isEmpty(config.features.$${feature}._KEYS_): \ + isEmpty($${currentConfig}.features.$${feature}._KEYS_): \ error("Asking for a report on undefined feature $${2}.") - $$eval(config.features.$${feature}.available): \ - return($$eval(config.features.$${feature}.description)) + $$eval($${currentConfig}.features.$${feature}.available): \ + return($$eval($${currentConfig}.features.$${feature}.label)) } return("<none>") @@ -1194,14 +1237,14 @@ defineTest(qtConfReport_firstAvailableFeature) { } defineTest(qtConfReport_feature) { - !contains(config.features._KEYS_, $$2): \ + !contains($${currentConfig}.features._KEYS_, $$2): \ error("Asking for a report on undefined feature $${2}.") # hide report for not emitted features - isEmpty(config.features.$${2}.available): \ + isEmpty($${currentConfig}.features.$${2}.available): \ return() - $$eval(config.features.$${2}.available) { + $$eval($${currentConfig}.features.$${2}.available) { result = "yes" !isEmpty(3): result = "$${3}" } else { @@ -1209,7 +1252,7 @@ defineTest(qtConfReport_feature) { !isEmpty(4): result = "$${4}" } - text = $$eval(config.features.$${2}.description) + text = $$eval($${currentConfig}.features.$${2}.label) qtConfReportPadded($${1}$$text, $$result) } @@ -1269,17 +1312,15 @@ defineTest(qtConfCreateReportRecurse) { } defineTest(qtConfProcessEarlyChecks) { - qtConfCreateReportRecurse(config.earlyReport, false) - qtConfCheckErrors() + qtConfCreateReportRecurse($${currentConfig}.earlyReport, false) } - defineTest(qtConfCreateReport) { - qtConfCreateReportRecurse(config.report, false) + qtConfCreateReportRecurse($${currentConfig}.report, false) } defineTest(qtConfCreateSummary) { - qtConfCreateReportRecurse(config.summary, "") + qtConfCreateReportRecurse($${currentConfig}.summary, "") } defineTest(qtConfPrintReport) { @@ -1321,15 +1362,6 @@ defineTest(qtConfCheckErrors) { # output generation # -defineReplace(qtConfOutputSelectProFile) { - !isEmpty($${1}.public) { - $$eval($${1}.public): \ - return(publicPro) - } - return(privatePro) -} - - # qtConfOutputVar(modifier, output, name, value) defineTest(qtConfOutputVar) { modifier = $$1 @@ -1337,35 +1369,53 @@ defineTest(qtConfOutputVar) { name = $$3 value = $$val_escape(4) - !isEmpty(config.output.$${output}.assign.$${name}): \ + defined($${currentConfig}.output.$${output}.assign.$${name}, var): \ error("Trying to overwrite assigned variable '$$name' in '$$output' using modifier '$$modifier'.") equals(modifier, assign) { - !isEmpty(config.output.$${output}.append.$${name})|!isEmpty(config.output.$${output}.remove.$${name}): \ + !isEmpty($${currentConfig}.output.$${output}.append.$${name})|!isEmpty($${currentConfig}.output.$${output}.remove.$${name}): \ error("Trying to assign variable '$$name' in '$$output', which has already appended or removed parts.") - config.output.$${output}.assign.$${name} = $$value + $${currentConfig}.output.$${output}.assign.$${name} = $$value } else: equals(modifier, append) { - contains(config.output.$${output}.remove.$${name}, $$value): \ + contains($${currentConfig}.output.$${output}.remove.$${name}, $$value): \ error("Trying to append removed '$$value' to variable '$$name' in '$$output'.") - config.output.$${output}.append.$${name} += $$value + $${currentConfig}.output.$${output}.append.$${name} += $$value } else: equals(modifier, remove) { - contains(config.output.$${output}.append.$${name}, $$value): \ + contains($${currentConfig}.output.$${output}.append.$${name}, $$value): \ error("Trying to remove appended '$$value' to variable '$$name' in '$$output'.") - config.output.$${output}.remove.$${name} += $$value + $${currentConfig}.output.$${output}.remove.$${name} += $$value } else { error("Invalid modifier '$$modifier' passed to qtConfOutputVar.") } - config.output.$${output}.$${modifier}._KEYS_ *= $${name} - export(config.output.$${output}.$${modifier}.$${name}) - export(config.output.$${output}.$${modifier}._KEYS_) + $${currentConfig}.output.$${output}.$${modifier}._KEYS_ *= $${name} + export($${currentConfig}.output.$${output}.$${modifier}.$${name}) + export($${currentConfig}.output.$${output}.$${modifier}._KEYS_) +} + +# qtConfExtendVar(output, name, value) +defineTest(qtConfExtendVar) { + output = $$1 + name = $$2 + value = $$val_escape(3) + + !defined($${currentConfig}.output.$${output}.assign.$${name}, var): \ + error("Trying to extend undefined variable '$$name' in '$$output'.") + + $${currentConfig}.output.$${output}.assign.$${name} += $$value + export($${currentConfig}.output.$${output}.assign.$${name}) } defineTest(qtConfOutputVarHelper) { + !isEmpty($${2}.public):$$eval($${2}.public) { + output = "publicPro" + } else { + output = "privatePro" + } + negative = $$eval($${2}.negative) isEmpty(negative): negative = false equals(3, $$negative): return() - output = $$qtConfOutputSelectProFile($${2}) name = $$eval($${2}.name) isEmpty(name): \ error("Output type 'var$$title($$1)' used in feature '$$eval($${2}.feature)' without a 'name' entry.") @@ -1374,6 +1424,8 @@ defineTest(qtConfOutputVarHelper) { !isEmpty($${2}.eval):$$qtConfEvaluate($$eval($${2}.eval)): \ eval(value = $$value) qtConfOutputVar($$1, $$output, $$name, $$value) + equals(output, "publicPro"):!isEmpty($${currentConfig}.module): \ + qtConfExtendVar($$output, "QT.$${currentModule}.exports", $$name) } defineTest(qtConfOutput_varAssign) { @@ -1391,6 +1443,8 @@ defineTest(qtConfOutput_varRemove) { defineTest(qtConfOutputConfigVar) { pro = $$3 var = $$4 + modular = $$5 + negative = $$eval($${1}.negative) isEmpty(negative): negative = false equals(2, $$negative): return() @@ -1401,26 +1455,31 @@ defineTest(qtConfOutputConfigVar) { $$negative: val = no-$$val } - qtConfOutputVar(append, $$pro, $$var, $$val) + isEmpty($${currentConfig}.module)|!$$modular: \ + qtConfOutputVar(append, $$pro, $$var, $$val) + else: \ + qtConfExtendVar($$pro, "QT.$${currentModule}.$$var", $$val) } defineTest(qtConfOutput_publicQtConfig) { - qtConfOutputConfigVar($$1, $$2, "publicPro", "QT_CONFIG") + qtConfOutputConfigVar($$1, $$2, "publicPro", "QT_CONFIG", true) } defineTest(qtConfOutput_publicConfig) { - qtConfOutputConfigVar($$1, $$2, "publicPro", "CONFIG") + !isEmpty($${currentConfig}.module): \ + error("Cannot use output type 'publicConfig' in module-local feature '$$eval($${1}.feature)'.") + qtConfOutputConfigVar($$1, $$2, "publicPro", "CONFIG", false) } defineTest(qtConfOutput_privateConfig) { - qtConfOutputConfigVar($$1, $$2, "privatePro", "CONFIG") + qtConfOutputConfigVar($$1, $$2, "privatePro", "CONFIG", false) } defineTest(qtConfOutputSetDefine) { - config.output.$${1}.$${2} = $${3} - config.output.$${1}._KEYS_ *= $${2} - export(config.output.$${1}.$${2}) - export(config.output.$${1}._KEYS_) + $${currentConfig}.output.$${1}.$${2} = $${3} + $${currentConfig}.output.$${1}._KEYS_ *= $${2} + export($${currentConfig}.output.$${1}.$${2}) + export($${currentConfig}.output.$${1}._KEYS_) } defineTest(qtConfOutput_define) { @@ -1443,13 +1502,35 @@ defineTest(qtConfOutput_feature) { name = $$eval($${1}.feature) $${2} { - qtConfOutputVar(append, "publicPro", "QT_CONFIG", $$name) + isEmpty($${currentConfig}.module): \ + qtConfOutputVar(append, "publicPro", "QT_CONFIG", $$name) + else: \ + qtConfExtendVar("publicPro", "QT.$${currentModule}.QT_CONFIG", $$name) } else { f = $$upper($$replace(name, -, _)) qtConfOutputSetDefine("publicHeader", "QT_NO_$$f") } } +defineTest(qtConfSetModuleName) { + currentModule = $$eval($${currentConfig}.module) + isEmpty(currentModule): \ + currentModule = global + export(currentModule) +} + +defineTest(qtConfSetupModuleOutputs) { + qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.enabled_features", ) + qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.disabled_features", ) + qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}_private.enabled_features", ) + qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}_private.disabled_features", ) + !isEmpty($${currentConfig}.module) { + qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.QT_CONFIG", ) + qtConfOutputVar(assign, "publicPro", "QT.$${currentModule}.exports", ) + qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}_private.libraries", ) + } +} + defineTest(qtConfOutput_publicFeature) { name = "$$eval($${1}.name)" isEmpty(name): \ @@ -1457,10 +1538,14 @@ defineTest(qtConfOutput_publicFeature) { feature = $$replace(name, [-+.], _) $${2} { - qtConfOutputVar(append, "publicPro", "QT.global.enabled_features", $$name) + qtConfExtendVar("publicPro", "QT.$${currentModule}.enabled_features", $$name) + QT.$${currentModule}.enabled_features += $$name + export(QT.$${currentModule}.enabled_features) qtConfOutputSetDefine("publicHeader", "QT_FEATURE_$$feature", 1) } else { - qtConfOutputVar(append, "publicPro", "QT.global.disabled_features", $$name) + qtConfExtendVar("publicPro", "QT.$${currentModule}.disabled_features", $$name) + QT.$${currentModule}.disabled_features += $$name + export(QT.$${currentModule}.disabled_features) qtConfOutputSetDefine("publicHeader", "QT_FEATURE_$$feature", -1) } } @@ -1475,17 +1560,21 @@ defineTest(qtConfOutput_privateFeature) { feature = $$replace(name, [-+.], _) $${2} { - qtConfOutputVar(append, "privatePro", "QT.global.enabled_features", $$name) + qtConfExtendVar("privatePro", "QT.$${currentModule}_private.enabled_features", $$name) + QT.$${currentModule}_private.enabled_features += $$name + export(QT.$${currentModule}_private.enabled_features) qtConfOutputSetDefine("privateHeader", "QT_FEATURE_$$feature", 1) } else { - qtConfOutputVar(append, "privatePro", "QT.global.disabled_features", $$name) + qtConfExtendVar("privatePro", "QT.$${currentModule}_private.disabled_features", $$name) + QT.$${currentModule}_private.disabled_features += $$name + export(QT.$${currentModule}_private.disabled_features) qtConfOutputSetDefine("privateHeader", "QT_FEATURE_$$feature", -1) } } defineTest(qtConfProcessOneOutput) { feature = $${1} - fpfx = config.features.$${feature} + fpfx = $${currentConfig}.features.$${feature} opfx = $${fpfx}.output.$${2} condition = $$eval($${opfx}.condition) @@ -1511,64 +1600,167 @@ defineTest(qtConfProcessOneOutput) { } defineTest(qtConfProcessOutput) { + !contains($${currentConfig}._KEYS_, "features"): \ + return() + + basedir = $$shadowed($$eval($${currentConfig}.dir)) + module = $$eval($${currentConfig}.module) + # write it to the output files - for (type, config.files._KEYS_) { - file = $$OUT_PWD/$$eval(config.files.$${type}) + isEmpty($${currentConfig}.files._KEYS_) { + # set defaults that should work for most Qt modules + isEmpty(module): \ + error("Neither module nor files section specified in configuration file.") + + $${currentConfig}.files._KEYS_ = publicPro privatePro publicHeader privateHeader + $${currentConfig}.files.publicPro = qt$${module}-config.pri + $${currentConfig}.files.privatePro = qt$${module}-config.pri # sic! + $${currentConfig}.files.publicHeader = qt$${module}-config.h + $${currentConfig}.files.privateHeader = qt$${module}-config_p.h + } + + for (type, $${currentConfig}.files._KEYS_) { contains(type, ".*Pro") { - for (k, config.output.$${type}.assign._KEYS_): \ - config.output.$$type += "$$k = $$eval(config.output.$${type}.assign.$$k)" - for (k, config.output.$${type}.remove._KEYS_): \ - config.output.$$type += "$$k -= $$eval(config.output.$${type}.remove.$$k)" - for (k, config.output.$${type}.append._KEYS_): \ - config.output.$$type += "$$k += $$eval(config.output.$${type}.append.$$k)" + for (k, $${currentConfig}.output.$${type}.assign._KEYS_): \ + $${currentConfig}.output.$$type += "$$k = $$eval($${currentConfig}.output.$${type}.assign.$$k)" + for (k, $${currentConfig}.output.$${type}.remove._KEYS_): \ + $${currentConfig}.output.$$type += "$$k -= $$eval($${currentConfig}.output.$${type}.remove.$$k)" + for (k, $${currentConfig}.output.$${type}.append._KEYS_): \ + $${currentConfig}.output.$$type += "$$k += $$eval($${currentConfig}.output.$${type}.append.$$k)" } else { - for (define, config.output.$${type}._KEYS_) { - value = $$eval(config.output.$${type}.$${define}) - config.output.$$type += "$${LITERAL_HASH}define $$define $$value" + for (define, $${currentConfig}.output.$${type}._KEYS_) { + value = $$eval($${currentConfig}.output.$${type}.$${define}) + $${currentConfig}.output.$$type += "$${LITERAL_HASH}define $$define $$value" } } - defined(qtConfOutputPostProcess_$${type}, test): \ - qtConfOutputPostProcess_$${type}() - write_file($$file, config.output.$${type})|error() + ppScope = + !isEmpty(module): ppScope = $${module}_ + defined(qtConfOutputPostProcess_$${ppScope}$${type}, test): \ + qtConfOutputPostProcess_$${ppScope}$${type}() + + file = $$eval($${currentConfig}.files.$${type}) + fileCont.$$file += $$eval($${currentConfig}.output.$${type}) + fileCont._KEYS_ *= $$file } + + for (file, fileCont._KEYS_): \ + write_file($$basedir/$$file, fileCont.$$file)|error() } # # tie it all together # -defineTest(qtConfigure) { +cfgs = +isEmpty(_QMAKE_SUPER_CACHE_)|equals(OUT_PWD, $$dirname(_QMAKE_SUPER_CACHE_)) { + c = $$basename(_PRO_FILE_PWD_) + config.$${c}.dir = $$_PRO_FILE_PWD_ + cfgs += $$c + !isEmpty(_QMAKE_SUPER_CACHE_) { + for (s, SUBDIRS) { + config.$${s}.dir = $$_PRO_FILE_PWD_/$${s} + cfgs += $$s + } + } +} +configsToProcess = +for (c, cfgs) { + s = $$eval(config.$${c}.dir) + exists($$s/configure.json): \ + configsToProcess += $$c +} +isEmpty(configsToProcess): \ + return() + +load(configure_base) + +QMAKE_POST_CONFIGURE = +allConfigs = +for(ever) { + isEmpty(configsToProcess): \ + break() + + currentConfig = config.$$take_first(configsToProcess) + thisDir = $$eval($${currentConfig}.dir) + jsonFile = $$thisDir/configure.json + priFile = $$thisDir/configure.pri + + allConfigs += $$currentConfig + # load configuration data - configure_data = $$cat($${1}, blob) - !parseJson(configure_data, config): \ - error("Invalid or non-existent file $${1}.") + configure_data = $$cat($$jsonFile, blob) + !parseJson(configure_data, $$currentConfig): \ + error("Invalid or non-existent file $${jsonFile}.") + exists($$priFile): \ + !include($$priFile): error() + + # prepend all subconfigs to files to keep a depth first search order + subconfigs = + for(n, $${currentConfig}.subconfigs._KEYS_) { + subconfig = $$eval($${currentConfig}.subconfigs.$${n}) + name = $$basename(subconfig) + config.$${name}.dir = $$thisDir/$$subconfig + subconfigs += $$name + } + configsToProcess = $$subconfigs $$configsToProcess +} +for (currentConfig, allConfigs): \ qtConfSetupLibraries() - qtConfSetupTestTypeDeps() - qtConfParseCommandLine() +!isEmpty(_QMAKE_SUPER_CACHE_): \ + QMAKE_CONFIG_CACHE = $$dirname(_QMAKE_SUPER_CACHE_)/config.cache +else: \ + QMAKE_CONFIG_CACHE = $$dirname(_QMAKE_CACHE_)/config.cache +QMAKE_CONFIG_CACHE_USE = all - !equals(QMAKE_CONFIG_CACHE_USE, none) { - include($$QMAKE_CONFIG_CACHE, , true) - # this crudely determines when to discard the cache. this also catches the case - # of no cache being there in the first place. - !equals(cache.platform, $$[QMAKE_SPEC])|!equals(cache.xplatform, $$[QMAKE_XSPEC]): \ - QMAKE_CONFIG_CACHE_USE = none - } - equals(QMAKE_CONFIG_CACHE_USE, none) { - cont = \ - "cache.platform = $$[QMAKE_SPEC]" \ - "cache.xplatform = $$[QMAKE_XSPEC]" - write_file($$QMAKE_CONFIG_CACHE, cont) - } +qtConfParseCommandLine() + +!equals(QMAKE_CONFIG_CACHE_USE, none) { + include($$QMAKE_CONFIG_CACHE, , true) + # this crudely determines when to discard the cache. this also catches the case + # of no cache being there in the first place. + !equals(cache.platform, $$[QMAKE_SPEC])|!equals(cache.xplatform, $$[QMAKE_XSPEC]): \ + QMAKE_CONFIG_CACHE_USE = none +} +equals(QMAKE_CONFIG_CACHE_USE, none) { + cont = \ + "cache.platform = $$[QMAKE_SPEC]" \ + "cache.xplatform = $$[QMAKE_XSPEC]" + write_file($$QMAKE_CONFIG_CACHE, cont) +} +for (currentConfig, allConfigs) { + qtConfSetModuleName() + qtConfSetupModuleOutputs() # do early checks, mainly to validate the command line qtConfProcessEarlyChecks() +} +qtConfCheckErrors() - CONFIG += qt_conf_tests_allowed - logn() - logn("Running configuration tests...") +CONFIG += qt_conf_tests_allowed +logn() +logn("Running configuration tests...") + +for (currentConfig, allConfigs) { + tdir = $$eval($${currentConfig}.testDir) + isEmpty(tdir): tdir = config.tests + QMAKE_CONFIG_TESTS_DIR = $$absolute_path($$tdir, $$eval($${currentConfig}.dir)) + + qtConfSetModuleName() + + qtConfSetupTestTypeDeps() + + # correctly setup dependencies + QMAKE_CONFIG_DEPS = global global_private + !isEmpty($${currentConfig}.module) { + for (d, $${currentConfig}.depends._KEYS_) { + dep = $$replace($${currentConfig}.depends.$$d, -private$, _private) + dep *= $$replace(dep, _private$, ) + QMAKE_CONFIG_DEPS += $$dep + } + } # process all features qtConfProcessFeatures() @@ -1577,14 +1769,15 @@ defineTest(qtConfigure) { qtConfProcessOutput() qtConfCreateReport() qtConfCreateSummary() - - logn("Done running configuration tests.") - logn() } -qtConfigure($$_PRO_FILE_PWD_/configure.json) +# these come from the pri files loaded above. +for (p, QMAKE_POST_CONFIGURE): \ + eval($$p) -logn("Configure summary:") +logn("Done running configuration tests.") logn() +logn("Configure summary:") +logn() qtConfPrintReport() diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index e7d73adefb..b1cfcd7499 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -1,10 +1,6 @@ defineReplace(qtPlatformTargetSuffix) { - uikit:CONFIG(simulator, simulator|device): \ - suffix = _$${simulator.sdk} - else: \ - suffix = - + suffix = CONFIG(debug, debug|release) { !debug_and_release|build_pass { mac: return($${suffix}_debug) @@ -306,10 +302,16 @@ defineTest(prepareRecursiveTarget) { } defineTest(qtConfig) { - contains(QT.global.enabled_features, $$1): \ - return(true) - contains(QT.global.disabled_features, $$1): \ - return(false) - + modules = $$QT $$QT_PRIVATE $$QT_FOR_CONFIG + modules ~= s,-private$,_private,g + modules = $$resolve_depends(modules, "QT.", ".depends") + modules += global global_private + modules = $$reverse(modules) + for (module, modules) { + contains(QT.$${module}.enabled_features, $$1): \ + return(true) + contains(QT.$${module}.disabled_features, $$1): \ + return(false) + } error("Could not find feature $${1}.") } diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 90b4c181ee..ed02c597da 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -119,8 +119,7 @@ lib_bundle { QMAKE_INFO_PLIST = $$QMAKESPEC/Info.plist.lib } !build_all| \ - if(if(!debug_and_release|CONFIG(release, debug|release)): \ - if(!simulator_and_device|CONFIG(device, simulator|device))) { + if(if(!debug_and_release|CONFIG(release, debug|release))) { FRAMEWORK_HEADERS.version = Versions FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES FRAMEWORK_HEADERS.path = Headers diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf index 9e0b21903f..229760068e 100644 --- a/mkspecs/features/qt_module_headers.prf +++ b/mkspecs/features/qt_module_headers.prf @@ -106,6 +106,16 @@ alien_syncqt: return() MODULE_INC_OUTDIR = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME +exists($$OUT_PWD/qt$${MODULE}-config.h) { + fwd_rel = $$relative_path($$OUT_PWD, $$MODULE_INC_OUTDIR) + SYNCQT.INJECTIONS += \ + $$fwd_rel/qt$${MODULE}-config.h:qt$${MODULE}-config.h \ + $$fwd_rel/qt$${MODULE}-config_p.h:$$MODULE_VERSION/$$MODULE_INCNAME/private/qt$${MODULE}-config_p.h + inst_rel = $$relative_path($$OUT_PWD, $$_PRO_FILE_PWD_) + SYNCQT.HEADER_FILES += $$inst_rel/qt$${MODULE}-config.h + SYNCQT.PRIVATE_HEADER_FILES += $$inst_rel/qt$${MODULE}-config_p.h +} + for (injection, SYNCQT.INJECTIONS) { injects = $$split(injection, :) dst_hdr = $$absolute_path($$member(injects, 0), $$MODULE_INC_OUTDIR) diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index b67a56c7d5..9542a362d0 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -35,6 +35,41 @@ else: \ MODULE_PRI = $$mod_inst_pfx/qt_lib_$${MODULE_ID}.pri MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri +exists($$OUT_PWD/qt$${MODULE}-config.pri): \ + include($$OUT_PWD/qt$${MODULE}-config.pri) + +defineReplace(qtGetFeaturesForModule) { + enabled = $$unique(QT.$${1}.enabled_features) + disabled = $$unique(QT.$${1}.disabled_features) + result = \ + "QT.$${1}.enabled_features =$$join(enabled, " ", " ")" \ + "QT.$${1}.disabled_features =$$join(disabled, " ", " ")" + return($$result) +} + +defineReplace(qtGetExportsForModule) { + result = + for (var, QT.$${1}.exports): \ + result += "$$var = $$val_escape($$var)" + return($$result) +} + +defineReplace(qtExportLibsForModule) { + result = + for (lib, QT.$${1}.libraries) { + NAME = $$upper($$lib) + vars = \ + QMAKE_LIBS_$$NAME QMAKE_LIBS_$${NAME}_DEBUG QMAKE_LIBS_$${NAME}_RELEASE \ + QMAKE_CFLAGS_$$NAME QMAKE_INCDIR_$$NAME QMAKE_$${NAME}_VERSION \ + QMAKE_$${NAME}_VERSION_MAJOR QMAKE_$${NAME}_VERSION_MINOR QMAKE_$${NAME}_VERSION_PATCH + for (var, vars) { + !isEmpty($$var): \ + result += "$$var = $$val_escape($$var)" + } + } + return($$result) +} + !build_pass { # Create a module .pri file @@ -102,6 +137,9 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri "QT.$${MODULE_ID}.module_config =$$join(module_build_type, " ", " ")" \ $$module_config \ "QT.$${MODULE_ID}.DEFINES = $$val_escape(MODULE_DEFINES)" \ + $$qtGetFeaturesForModule($$MODULE_ID) \ + $$qtGetExportsForModule($$MODULE_ID) \ + "QT_CONFIG +=$$join(QT.$${MODULE_ID}.QT_CONFIG, " ", " ")" \ "" \ "QT_MODULES += $$MODULE" winrt: MODULE_PRI_CONT += \ @@ -126,7 +164,10 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri "QT.$${MODULE}_private.includes = $$MODULE_PRIVATE_INCLUDES" \ "QT.$${MODULE}_private.frameworks =" \ "QT.$${MODULE}_private.depends = $$private_deps" \ - "QT.$${MODULE}_private.module_config =$$join(module_build_type, " ", " ")" + "QT.$${MODULE}_private.module_config =$$join(module_build_type, " ", " ")" \ + $$qtGetFeaturesForModule($${MODULE}_private) \ + "" \ + $$qtExportLibsForModule($${MODULE}_private) write_file($$MODULE_PRIVATE_PRI, MODULE_PRIVATE_PRI_CONT)|error() } MODULE_PRI_FILES = $$MODULE_PRI $$MODULE_PRIVATE_PRI diff --git a/mkspecs/features/qt_parts.prf b/mkspecs/features/qt_parts.prf index fa62f40e35..0accef6665 100644 --- a/mkspecs/features/qt_parts.prf +++ b/mkspecs/features/qt_parts.prf @@ -12,6 +12,8 @@ # Ensure that each module has a .qmake.cache when properly qmake'd. cache() +load(qt_configure) + load(qt_build_config) TEMPLATE = subdirs @@ -74,6 +76,7 @@ QT_BUILD_PARTS -= libs tools examples tests QMAKE_DISTCLEAN += \ .qmake.cache \ + config.cache \ config.log \ mkspecs/modules/*.pri \ mkspecs/modules-inst/*.pri diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf index 08ed00715d..64a6a9266b 100644 --- a/mkspecs/features/testcase.prf +++ b/mkspecs/features/testcase.prf @@ -181,6 +181,11 @@ isEmpty(BUILDS)|build_pass { builtin_testdata { ALL_TESTDATA = $$TESTDATA $$GENERATED_TESTDATA + + # BLACKLIST needs to be added to the testdata + BLACKLISTPATH = $$_PRO_FILE_PWD_/BLACKLIST + exists($$BLACKLISTPATH): ALL_TESTDATA *= $$BLACKLISTPATH + # RESOURCES does not support wildcards (for good reasons) for(td, ALL_TESTDATA): \ testdata.files += $$files($$absolute_path($$td, $$_PRO_FILE_PWD_)) diff --git a/mkspecs/features/uikit/default_post.prf b/mkspecs/features/uikit/default_post.prf index 52c9b1e8c8..9a231ffc84 100644 --- a/mkspecs/features/uikit/default_post.prf +++ b/mkspecs/features/uikit/default_post.prf @@ -19,10 +19,13 @@ equals(TEMPLATE, app):qt { load(default_post) macx-xcode { + ios:isEmpty(QMAKE_APPLE_TARGETED_DEVICE_FAMILY):!isEmpty(QMAKE_IOS_TARGETED_DEVICE_FAMILY) { + warning("QMAKE_IOS_TARGETED_DEVICE_FAMILY is deprecated; use QMAKE_APPLE_TARGETED_DEVICE_FAMILY") + QMAKE_APPLE_TARGETED_DEVICE_FAMILY = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY + } + device_family.name = TARGETED_DEVICE_FAMILY - ios: device_family.value = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY - tvos: device_family.value = $$QMAKE_TVOS_TARGETED_DEVICE_FAMILY - watchos: device_family.value = $$QMAKE_WATCHOS_TARGETED_DEVICE_FAMILY + device_family.value = $$QMAKE_APPLE_TARGETED_DEVICE_FAMILY QMAKE_MAC_XCODE_SETTINGS += device_family ios { @@ -68,21 +71,10 @@ macx-xcode { macx-xcode { arch_device.name = "ARCHS[sdk=$${device.sdk}*]" arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]" - ios { - arch_device.value = $$QMAKE_IOS_DEVICE_ARCHS - arch_simulator.value = $$QMAKE_IOS_SIMULATOR_ARCHS - QMAKE_XCODE_ARCHS = $$QMAKE_IOS_DEVICE_ARCHS $$QMAKE_IOS_SIMULATOR_ARCHS - } - tvos { - arch_device.value = $$QMAKE_TVOS_DEVICE_ARCHS - arch_simulator.value = $$QMAKE_TVOS_SIMULATOR_ARCHS - QMAKE_XCODE_ARCHS = $$QMAKE_TVOS_DEVICE_ARCHS $$QMAKE_TVOS_SIMULATOR_ARCHS - } - watchos { - arch_device.value = $$QMAKE_WATCHOS_DEVICE_ARCHS - arch_simulator.value = $$QMAKE_WATCHOS_SIMULATOR_ARCHS - QMAKE_XCODE_ARCHS = $$QMAKE_WATCHOS_DEVICE_ARCHS $$QMAKE_WATCHOS_SIMULATOR_ARCHS - } + + arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS + arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS + QMAKE_XCODE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS $$QMAKE_APPLE_SIMULATOR_ARCHS QMAKE_MAC_XCODE_SETTINGS += arch_device arch_simulator @@ -91,16 +83,9 @@ macx-xcode { only_active_arch.build = debug QMAKE_MAC_XCODE_SETTINGS += only_active_arch } else { - # Be more specific about which architecture we're targeting - contains(QT_ARCH, arm.*) { - ios: VALID_ARCHS = $$QMAKE_IOS_DEVICE_ARCHS - tvos: VALID_ARCHS = $$QMAKE_TVOS_DEVICE_ARCHS - watchos: VALID_ARCHS = $$QMAKE_WATCHOS_DEVICE_ARCHS - } else { - ios: VALID_ARCHS = $$QMAKE_IOS_SIMULATOR_ARCHS - tvos: VALID_ARCHS = $$QMAKE_TVOS_SIMULATOR_ARCHS - watchos: VALID_ARCHS = $$QMAKE_WATCHOS_SIMULATOR_ARCHS - } + VALID_ARCHS = + !simulator|simulator_and_device: VALID_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS + simulator: VALID_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS single_arch: VALID_ARCHS = $$first(VALID_ARCHS) @@ -114,4 +99,6 @@ macx-xcode { QMAKE_CFLAGS += $$arch_flags QMAKE_CXXFLAGS += $$arch_flags QMAKE_LFLAGS += $$arch_flags + + QMAKE_PCH_ARCHS = $$VALID_ARCHS } diff --git a/mkspecs/features/uikit/default_pre.prf b/mkspecs/features/uikit/default_pre.prf index e719ab0848..8b5b3ccfe9 100644 --- a/mkspecs/features/uikit/default_pre.prf +++ b/mkspecs/features/uikit/default_pre.prf @@ -1,31 +1,22 @@ load(default_pre) -# In case Qt was built for a specific SDK -!isEmpty(QT_VERSION):!qtConfig(simulator_and_device):contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \ - CONFIG += simulator $${simulator.sdk} +!isEmpty(QT_VERSION) { + qtConfig(simulator_and_device)|contains(QMAKE_MAC_SDK, ^$${device.sdk}.*): \ + CONFIG += device $${device.sdk} + qtConfig(simulator_and_device)|contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \ + CONFIG += simulator $${simulator.sdk} + + qtConfig(simulator_and_device) { + # For a simulator_and_device build all the config tests + # are based on the device's ARM SDK, but we know that the simulator + # is Intel and that we support SSE/SSE2. + QT_CPU_FEATURES.$$QT_ARCH += sse sse2 + CONFIG += sse sse2 + DEFINES += QT_COMPILER_SUPPORTS_SSE2 + } +} # Check for supported Xcode versions lessThan(QMAKE_XCODE_VERSION, "4.3"): \ error("This mkspec requires Xcode 4.3 or later") - -build_pass:simulator { - # For a simulator_and_device build all the config tests - # are based on the iPhoneOS/WatchOS ARM SDK, but we know that the simulator - # is i386 and that we support SSE/SSE2. - QT_ARCH = i386 - QT_CPU_FEATURES.i386 = sse sse2 - DEFINES += QT_COMPILER_SUPPORTS_SSE2 - CONFIG -= neon - CONFIG += sse sse2 -} -build_pass:appletvsimulator { - # For a simulator_and_device build all the config tests - # are based on the AppleTVOS ARM SDK, but we know that the simulator - # is x64 and that we support SSE/SSE2. - QT_ARCH = x64 - QT_CPU_FEATURES.x64 = sse sse2 - DEFINES += QT_COMPILER_SUPPORTS_SSE2 - CONFIG -= neon - CONFIG += sse sse2 -} diff --git a/mkspecs/features/uikit/resolve_config.prf b/mkspecs/features/uikit/resolve_config.prf index c3ab90f45e..70ddd8be52 100644 --- a/mkspecs/features/uikit/resolve_config.prf +++ b/mkspecs/features/uikit/resolve_config.prf @@ -1,68 +1,11 @@ xcodebuild { # Xcode project files always support both Debug and Release configurations - # and iOS device and simulator targets, so we make sure the wrapper-makefile + # and device and simulator targets, so we make sure the wrapper-makefile # also does. CONFIG += debug_and_release simulator_and_device } load(resolve_config) -# Legacy exclusive build configurations for backwards compatibility -CONFIG($${device.CONFIG}, $${device.CONFIG}|$${simulator.CONFIG}): \ - CONFIG += device -else: CONFIG($${simulator.CONFIG}, $${device.CONFIG}|$${simulator.CONFIG}): \ - CONFIG += simulator - -CONFIG(simulator, simulator|device): \ - CONFIG -= device $${device.CONFIG} -else: \ - CONFIG -= simulator $${simulator.CONFIG} - -macx-xcode { - # There is no way to genereate Xcode projects that are limited to either - # simulator or device builds, so simulator_and_device is always - # effectivly active, even if the user disabled it explicitly. - # The Xcode generator doesn't support multiple BUILDS though (exclusive - # builds), so we have to manually set up the simulator suffix. - library_suffix_simulator.name = "$${QMAKE_XCODE_LIBRARY_SUFFIX_SETTING}[sdk=$${simulator.sdk}*]" - library_suffix_simulator.value = "_$${simulator.sdk}$($${QMAKE_XCODE_LIBRARY_SUFFIX_SETTING})" - QMAKE_MAC_XCODE_SETTINGS += library_suffix_simulator - CONFIG *= xcode_dynamic_library_suffix -} else { - addExclusiveBuilds(simulator, device) -} - -equals(TEMPLATE, subdirs) { - # Prevent recursion into host_builds - for(subdir, SUBDIRS) { - contains($${subdir}.CONFIG, host_build) { - $${subdir}.CONFIG += no_$${simulator.target}_target no_$${device.target}_target - - # Other targets which we do want to recurse into may depend on this target, - # for example corelib depends on moc, rcc, bootstrap, etc, and other libs - # may depend on host-tools that are needed to build the lib, so we resolve - # the final target name and redirect it to the base target, so that the - # dependency chain is not broken for the other targets. - - !isEmpty($${subdir}.target) { - target = $$eval($${subdir}.target) - } else { - !isEmpty($${subdir}.file): \ - file = $$eval($${subdir}.file) - else: !isEmpty($${subdir}.subdir): \ - file = $$eval($${subdir}.subdir) - else: \ - file = $$subdir - - target = sub-$$file - } - - target ~= s,[^a-zA-Z0-9_],-, - - $${target}-$${simulator.target}.depends = $$target - $${target}-$${device.target}.depends = $$target - QMAKE_EXTRA_TARGETS += $${target}-$${simulator.target} $${target}-$${device.target} - } - } -} +!macx-xcode:xcodebuild: addExclusiveBuilds(simulator, device) diff --git a/mkspecs/integrity-armv7-imx6/qmake.conf b/mkspecs/integrity-armv7-imx6/qmake.conf index 7a1ee461f2..3bf2abd844 100644 --- a/mkspecs/integrity-armv7-imx6/qmake.conf +++ b/mkspecs/integrity-armv7-imx6/qmake.conf @@ -4,7 +4,6 @@ include(../common/ghs-integrity-armv7.conf) -DEFINES += QT_NO_CLIPBOARD DEFINES += QT_STATICPLUGIN QTPLUGIN.platforms += qeglfs qeglfs-viv-integration diff --git a/mkspecs/integrity-armv7/qmake.conf b/mkspecs/integrity-armv7/qmake.conf index 0cac2ebdc0..7a2ffaba14 100644 --- a/mkspecs/integrity-armv7/qmake.conf +++ b/mkspecs/integrity-armv7/qmake.conf @@ -4,7 +4,6 @@ include(../common/ghs-integrity-armv7.conf) -DEFINES += QT_NO_CLIPBOARD DEFINES += QT_STATICPLUGIN QTPLUGIN.platforms += integrityfb diff --git a/mkspecs/integrity-x86/qmake.conf b/mkspecs/integrity-x86/qmake.conf index 4a5cfcc49d..13d4a6c082 100644 --- a/mkspecs/integrity-x86/qmake.conf +++ b/mkspecs/integrity-x86/qmake.conf @@ -5,7 +5,6 @@ include(../common/ghs-integrity-x86.conf) QMAKE_CFLAGS += -cpu=Corei -DEFINES += QT_NO_CLIPBOARD DEFINES += QT_STATICPLUGIN QTPLUGIN.platforms += integrityfb diff --git a/mkspecs/macx-ios-clang/qmake.conf b/mkspecs/macx-ios-clang/qmake.conf index a119ca6fa2..3f6d133a76 100644 --- a/mkspecs/macx-ios-clang/qmake.conf +++ b/mkspecs/macx-ios-clang/qmake.conf @@ -5,10 +5,10 @@ QMAKE_IOS_DEPLOYMENT_TARGET = 7.0 # Universal target (iPhone and iPad) -QMAKE_IOS_TARGETED_DEVICE_FAMILY = 1,2 +QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 1,2 -QMAKE_IOS_DEVICE_ARCHS = armv7 arm64 -QMAKE_IOS_SIMULATOR_ARCHS = i386 x86_64 +QMAKE_APPLE_DEVICE_ARCHS = armv7 arm64 +QMAKE_APPLE_SIMULATOR_ARCHS = i386 x86_64 include(../common/ios.conf) include(../common/gcc-base-mac.conf) diff --git a/mkspecs/macx-tvos-clang/qmake.conf b/mkspecs/macx-tvos-clang/qmake.conf index f622256eca..d233f5b7b3 100644 --- a/mkspecs/macx-tvos-clang/qmake.conf +++ b/mkspecs/macx-tvos-clang/qmake.conf @@ -4,10 +4,10 @@ QMAKE_TVOS_DEPLOYMENT_TARGET = 9.1 -QMAKE_TVOS_TARGETED_DEVICE_FAMILY = 3 +QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 3 -QMAKE_TVOS_DEVICE_ARCHS = arm64 -QMAKE_TVOS_SIMULATOR_ARCHS = x86_64 +QMAKE_APPLE_DEVICE_ARCHS = arm64 +QMAKE_APPLE_SIMULATOR_ARCHS = x86_64 include(../common/tvos.conf) include(../common/gcc-base-mac.conf) diff --git a/mkspecs/macx-watchos-clang/qmake.conf b/mkspecs/macx-watchos-clang/qmake.conf index f01ef21cad..f68848d1e7 100644 --- a/mkspecs/macx-watchos-clang/qmake.conf +++ b/mkspecs/macx-watchos-clang/qmake.conf @@ -4,10 +4,10 @@ QMAKE_WATCHOS_DEPLOYMENT_TARGET = 2.2 -QMAKE_WATCHOS_TARGETED_DEVICE_FAMILY = 4 +QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 4 -QMAKE_WATCHOS_DEVICE_ARCHS = armv7k -QMAKE_WATCHOS_SIMULATOR_ARCHS = i386 +QMAKE_APPLE_DEVICE_ARCHS = armv7k +QMAKE_APPLE_SIMULATOR_ARCHS = i386 include(../common/watchos.conf) include(../common/gcc-base-mac.conf) diff --git a/mkspecs/qnx-aarch64le-qcc/qmake.conf b/mkspecs/qnx-aarch64le-qcc/qmake.conf index 6d72bd459e..5e3123bece 100644 --- a/mkspecs/qnx-aarch64le-qcc/qmake.conf +++ b/mkspecs/qnx-aarch64le-qcc/qmake.conf @@ -2,7 +2,7 @@ # qmake configuration for qnx aarch64le systems # -DEFINES += QT_NO_CLIPBOARD _FORTIFY_SOURCE=2 +DEFINES += _FORTIFY_SOURCE=2 QMAKE_LFLAGS_SHLIB += -Wl,-z,relro -Wl,-z,now diff --git a/mkspecs/qnx-armle-v7-qcc/qmake.conf b/mkspecs/qnx-armle-v7-qcc/qmake.conf index b77455044c..a21e5bcad3 100644 --- a/mkspecs/qnx-armle-v7-qcc/qmake.conf +++ b/mkspecs/qnx-armle-v7-qcc/qmake.conf @@ -3,5 +3,3 @@ # include(../common/qcc-base-qnx-armle-v7.conf) - -DEFINES += QT_NO_CLIPBOARD diff --git a/mkspecs/qnx-x86-64-qcc/qmake.conf b/mkspecs/qnx-x86-64-qcc/qmake.conf index ebedeceb46..2a01ed1405 100644 --- a/mkspecs/qnx-x86-64-qcc/qmake.conf +++ b/mkspecs/qnx-x86-64-qcc/qmake.conf @@ -2,8 +2,6 @@ # qmake configuration for qnx x86-64 systems # -DEFINES += QT_NO_CLIPBOARD - QMAKE_LFLAGS_SHLIB += -Wl,-z,relro -Wl,-z,now include(../common/qcc-base-qnx-x86-64.conf) diff --git a/mkspecs/qnx-x86-qcc/qmake.conf b/mkspecs/qnx-x86-qcc/qmake.conf index 36a3ba2ff3..3daadf4f02 100644 --- a/mkspecs/qnx-x86-qcc/qmake.conf +++ b/mkspecs/qnx-x86-qcc/qmake.conf @@ -3,5 +3,3 @@ # include(../common/qcc-base-qnx-x86.conf) - -DEFINES += QT_NO_CLIPBOARD |