diff options
Diffstat (limited to 'mkspecs/features')
30 files changed, 244 insertions, 181 deletions
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 1099e14b17..bb5083c925 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -268,7 +268,7 @@ mac { } else { CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.VERSION) CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.VERSION) - CMAKE_LIB_SONAME = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.MAJOR_VERSION) + CMAKE_LIB_SONAME = lib$${CMAKE_QT_STEM}.so.$$section(QT.$${MODULE}.VERSION, ., 0, 0) } } diff --git a/mkspecs/features/ctest_testcase_common.prf b/mkspecs/features/ctest_testcase_common.prf index 8cdad77a78..cdc5cca1d7 100644 --- a/mkspecs/features/ctest_testcase_common.prf +++ b/mkspecs/features/ctest_testcase_common.prf @@ -77,10 +77,11 @@ CMAKE_MODULE_VERSIONS = CMAKE_MODULES_UNDER_TEST = for (MODULE_UNDER_TEST, CMAKE_QT_MODULES_UNDER_TEST) { CMAKE_NAME = $$cmakeModuleName($$MODULE_UNDER_TEST) + ver = $$eval(QT.$${MODULE_UNDER_TEST}.VERSION) CMAKE_MODULE_VERSIONS += \ - -DCMAKE_$${CMAKE_NAME}_MODULE_MAJOR_VERSION=$$eval(QT.$${MODULE_UNDER_TEST}.MAJOR_VERSION) \ - -DCMAKE_$${CMAKE_NAME}_MODULE_MINOR_VERSION=$$eval(QT.$${MODULE_UNDER_TEST}.MINOR_VERSION) \ - -DCMAKE_$${CMAKE_NAME}_MODULE_PATCH_VERSION=$$eval(QT.$${MODULE_UNDER_TEST}.PATCH_VERSION) + -DCMAKE_$${CMAKE_NAME}_MODULE_MAJOR_VERSION=$$section(ver, ., 0, 0) \ + -DCMAKE_$${CMAKE_NAME}_MODULE_MINOR_VERSION=$$section(ver, ., 1, 1) \ + -DCMAKE_$${CMAKE_NAME}_MODULE_PATCH_VERSION=$$section(ver, ., 2, 2) CMAKE_MODULES_UNDER_TEST += $$CMAKE_NAME } CMAKE_MODULES_UNDER_TEST = $$join(CMAKE_MODULES_UNDER_TEST, ;) diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index d2358cae4b..866ace6c5c 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -166,6 +166,8 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) endif() !!ENDIF + set(Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS}) + set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED) if (Qt5$${CMAKE_MODULE_NAME}_FIND_REQUIRED) set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED REQUIRED) @@ -243,6 +245,29 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINE}) + set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE) + foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}) + if (NOT EXISTS ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR}) + set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST FALSE) + endif() + endforeach() + + if (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST) + add_library(Qt5::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY + INTERFACE_INCLUDE_DIRECTORIES ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS} + ) + set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS) + foreach(dep ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}) + if (TARGET ${dep}Private) + list(APPEND _Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS ${dep}Private) + endif() + endforeach() + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY + INTERFACE_LINK_LIBRARIES Qt5::$${CMAKE_MODULE_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS} + ) + endif() + !!IF !equals(TEMPLATE, aux) !!IF !isEmpty(CMAKE_RELEASE_TYPE) !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) diff --git a/mkspecs/features/data/mac/objc_namespace.sh b/mkspecs/features/data/mac/objc_namespace.sh index 0c7faf18bf..6ac004fe2d 100755 --- a/mkspecs/features/data/mac/objc_namespace.sh +++ b/mkspecs/features/data/mac/objc_namespace.sh @@ -2,32 +2,38 @@ ############################################################################# ## -## Copyright (C) 2015 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ ## ## This file is the build configuration utility of the Qt Toolkit. ## -## $QT_BEGIN_LICENSE:LGPL21$ +## $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 http://www.qt.io/terms-conditions. For further -## information use the contact form at http://www.qt.io/contact-us. +## 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 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. +## 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. ## -## 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. +## 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$ ## diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index 60759b445e..d1ec0ce637 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -47,6 +47,11 @@ optimize_full { } } +optimize_debug { + QMAKE_CFLAGS_DEBUG += $$QMAKE_CFLAGS_OPTIMIZE_DEBUG + QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_OPTIMIZE_DEBUG +} + debug { QMAKE_CFLAGS += $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG diff --git a/mkspecs/features/link_ltcg.prf b/mkspecs/features/link_ltcg.prf index 734743ca13..03d0e813b6 100644 --- a/mkspecs/features/link_ltcg.prf +++ b/mkspecs/features/link_ltcg.prf @@ -1,5 +1,6 @@ gcc { - !clang:!intel_icc:greaterThan(QMAKE_HOST.cpu_count, 1) { + # on Windows, MinGW's support for -flto=N is broken + !clang:!intel_icc:!equals(QMAKE_HOST.os, Windows):greaterThan(QMAKE_HOST.cpu_count, 1) { # Override LTO number of jobs QMAKE_LFLAGS_LTCG ~= s/^-flto$/-flto=$$QMAKE_HOST.cpu_count/ } diff --git a/mkspecs/features/mac/asset_catalogs.prf b/mkspecs/features/mac/asset_catalogs.prf index 87875136c2..123a0e0fcd 100644 --- a/mkspecs/features/mac/asset_catalogs.prf +++ b/mkspecs/features/mac/asset_catalogs.prf @@ -10,6 +10,9 @@ # Name of the icon resource in the asset catalogs that will be used as the app icon. # Defaults to AppIcon. # +# QMAKE_ASSET_CATALOGS_LAUNCH_IMAGE +# Name of the launch image resource in the asset catalogs that will be used as the launch image. +# # QMAKE_ASSET_CATALOGS_INSTALL_PATH # Base path to install files to. Falls back to a path relative to the target install path, # based on QMAKE_ASSET_CATALOGS_BUILD_PATH. @@ -40,6 +43,12 @@ QMAKE_MAC_XCODE_SETTINGS += asset_catalog_appicon } + !isEmpty(QMAKE_ASSET_CATALOGS_LAUNCH_IMAGE) { + asset_catalog_launchimage.name = "ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME" + asset_catalog_launchimage.value = $$QMAKE_ASSET_CATALOGS_LAUNCH_IMAGE + QMAKE_MAC_XCODE_SETTINGS += asset_catalog_launchimage + } + asset_catalog_compiler.files = $$QMAKE_ASSET_CATALOGS macos: asset_catalog_compiler.path = Contents/Resources QMAKE_BUNDLE_DATA += asset_catalog_compiler @@ -49,9 +58,15 @@ --app-icon $$shell_quote($$QMAKE_ASSET_CATALOGS_APP_ICON) } + !isEmpty(QMAKE_ASSET_CATALOGS_LAUNCH_IMAGE) { + asset_catalog_launch_image_arg = \ + --launch-image $$shell_quote($$QMAKE_ASSET_CATALOGS_LAUNCH_IMAGE) + } + asset_catalog_compiler.target = $$OUT_PWD/asset_catalog_compiler.Info.plist asset_catalog_compiler.commands = $$shell_quote($$QMAKE_ACTOOL) \ $$asset_catalog_app_icon_arg \ + $$asset_catalog_launch_image_arg \ --output-partial-info-plist $$shell_quote($$asset_catalog_compiler.target) \ --platform $${version_identifier} \ --minimum-deployment-target $${deployment_target} \ diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index f39e610e88..cb8543254a 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -1,4 +1,5 @@ load(default_post) + !no_objective_c:CONFIG += objective_c qt { @@ -24,12 +25,26 @@ qt { } } +# Add the same default rpaths as Xcode does for new projects. +# This is especially important for iOS/tvOS/watchOS where no other option is possible. +!no_default_rpath { + QMAKE_RPATHDIR += @executable_path/Frameworks + equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks +} + # Don't pass -headerpad_max_install_names when using Bitcode. # In that case the linker emits a warning stating that the flag is ignored when # used with bitcode, for reasons that cannot be determined (rdar://problem/20748962). # Using this flag is also unnecessary in practice on UIKit platforms since they # are sandboxed, and only UIKit platforms support bitcode to begin with. -!bitcode: QMAKE_LFLAGS += -headerpad_max_install_names +!bitcode: QMAKE_LFLAGS += $$QMAKE_LFLAGS_HEADERPAD + +app_extension_api_only { + QMAKE_CFLAGS += -fapplication-extension + QMAKE_CXXFLAGS += -fapplication-extension + QMAKE_CXXFLAGS_PRECOMPILE += -fapplication-extension + QMAKE_LFLAGS += -fapplication-extension +} macx-xcode { !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) { @@ -38,26 +53,66 @@ macx-xcode { debug_information_format.build = debug QMAKE_MAC_XCODE_SETTINGS += debug_information_format } + + QMAKE_XCODE_ARCHS = + + arch_device.name = "ARCHS[sdk=$${device.sdk}*]" + arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS + QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS + QMAKE_MAC_XCODE_SETTINGS += arch_device + + simulator { + arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]" + arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS + QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS + QMAKE_MAC_XCODE_SETTINGS += arch_simulator + } + + only_active_arch.name = ONLY_ACTIVE_ARCH + only_active_arch.value = YES + only_active_arch.build = debug + QMAKE_MAC_XCODE_SETTINGS += only_active_arch } else { - uikit { - ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET - tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET - watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET + device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS + simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS + VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS + + isEmpty(VALID_ARCHS): \ + error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture") + + single_arch: VALID_ARCHS = $$first(VALID_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 + ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS)) + ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch)) - isEmpty(VALID_ARCHS): \ - error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture") + QMAKE_EXTRA_VARIABLES += VALID_ARCHS ACTIVE_ARCHS ARCH_ARGS + arch_flags = $(EXPORT_ARCH_ARGS) + + QMAKE_CFLAGS += $$arch_flags + QMAKE_CXXFLAGS += $$arch_flags + QMAKE_LFLAGS += $$arch_flags + + QMAKE_PCH_ARCHS = $$VALID_ARCHS + + macos: deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET + ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET + tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET + watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET + + # If we're doing a simulator and device build, device and simulator + # architectures use different paths and flags for the sysroot and + # deployment target switch, so we must multiplex them across multiple + # architectures using -Xarch. Otherwise we fall back to the simple path. + # This is not strictly necessary, but results in cleaner command lines + # and makes it easier for people to override EXPORT_VALID_ARCHS to limit + # individual rules to a different set of architecture(s) from the overall + # build (such as machtest in QtCore). + simulator:device { QMAKE_XARCH_CFLAGS = QMAKE_XARCH_LFLAGS = QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS - single_arch: VALID_ARCHS = $$first(VALID_ARCHS) - for (arch, VALID_ARCHS) { contains(VALID_SIMULATOR_ARCHS, $$arch) { sdk = $$simulator.sdk @@ -85,29 +140,32 @@ macx-xcode { QMAKE_XARCH_LFLAGS_$${arch} } - QMAKE_CFLAGS_USE_PRECOMPILE = - for (arch, VALID_ARCHS) { - QMAKE_CFLAGS_USE_PRECOMPILE += \ - -Xarch_$${arch} \ - -include${QMAKE_PCH_OUTPUT_$${arch}} - } - QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE - QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE - QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE - - QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT} + QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) + QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) + QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS) } else { - version_identifier = macosx - deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET + simulator: \ + version_identifier = $$simulator.deployment_identifier + else: \ + version_identifier = $$device.deployment_identifier version_min_flag = -m$${version_identifier}-version-min=$$deployment_target QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH $$version_min_flag } - QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) - QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) - QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS) + # Enable precompiled headers for multiple architectures + QMAKE_CFLAGS_USE_PRECOMPILE = + for (arch, VALID_ARCHS) { + QMAKE_CFLAGS_USE_PRECOMPILE += \ + -Xarch_$${arch} \ + -include${QMAKE_PCH_OUTPUT_$${arch}} + } + QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE + + QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT} } cache(QMAKE_XCODE_DEVELOPER_PATH, stash) diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index 0cdfa300f5..15eb38af31 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -27,7 +27,7 @@ win32:count(MOC_INCLUDEPATH, 40, >) { # QNX's compiler sets "gcc" config, but does not support the -dM option; # UIKit builds are always multi-arch due to simulator_and_device (unless # -sdk is used) so this feature cannot possibly work. -if(gcc|intel_icl|msvc):!rim_qcc:!uikit:!no_moc_predefs { +if(gcc|intel_icl|msvc):!rim_qcc:!uikit:!no_moc_predefs:if(!macos|count(QMAKE_APPLE_DEVICE_ARCHS, 1)) { moc_predefs.name = "Generate moc_predefs.h" moc_predefs.CONFIG = no_link gcc: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -dM -E -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index 7e12626db3..d49f4c49c1 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -21,6 +21,9 @@ if(win32|mac):!macx-xcode { CONFIG += relative_qt_rpath # Qt's QML plugins should be relocatable +# Qt libraries should only use Application Extension safe APIs +darwin:!no_app_extension_api_only: CONFIG += app_extension_api_only + !no_cxx_module:isEmpty(CXX_MODULE) { CXX_MODULE = $$TARGET TARGET = declarative_$${TARGET} @@ -98,10 +101,10 @@ load(qt_common) build_pass|!debug_and_release { isEmpty(IMPORT_VERSION) { no_cxx_module { - IMPORT_VERSION = $$replace(MODULE_VERSION, ^(\\d+\\.\\d+).*, \\1) + IMPORT_VERSION = $$section(MODULE_VERSION, ., 0, 1) isEmpty(IMPORT_VERSION): error("Must set IMPORT_VERSION") } else { - IMPORT_VERSION = $$eval(QT.$${CXX_MODULE}.MAJOR_VERSION).$$eval(QT.$${CXX_MODULE}.MINOR_VERSION) + IMPORT_VERSION = $$section(QT.$${CXX_MODULE}.VERSION, ., 0, 1) } } diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index 11d5695c63..150d2b2cc3 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -97,6 +97,8 @@ CONFIG += \ # resolved), nor functional (.res files end up in .prl files and break things). unix: CONFIG += explicitlib +# By default we want tests on macOS to be built as standalone executables +macos: CONFIG += testcase_no_bundle defineTest(qtBuildPart) { bp = $$eval($$upper($$section(_QMAKE_CONF_, /, -2, -2))_BUILD_PARTS) diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index eaea8f2d4b..3da6bf8c11 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -12,6 +12,8 @@ QMAKE_DIR_REPLACE_SANE += DESTDIR CONFIG -= debug_and_release_target +DEFINES *= QT_NO_NARROWING_CONVERSIONS_IN_CONNECT + qtConfig(c++11): CONFIG += c++11 strict_c++ qtConfig(c++14): CONFIG += c++14 qtConfig(c++1z): CONFIG += c++1z diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf index 973a2182c9..93c54e3010 100644 --- a/mkspecs/features/qt_config.prf +++ b/mkspecs/features/qt_config.prf @@ -26,11 +26,7 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS] QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS] QT_MODULE_HOST_LIB_BASE = $$[QT_HOST_LIBS] - QT_MODULE_PLUGIN_BASE = $$[QT_INSTALL_PLUGINS] - QT_MODULE_LIBEXEC_BASE = $$[QT_INSTALL_LIBEXECS] QT_MODULE_BIN_BASE = $$[QT_INSTALL_BINS] - QT_MODULE_IMPORT_BASE = $$[QT_INSTALL_IMPORTS] - QT_MODULE_QML_BASE = $$[QT_INSTALL_QML] include($$mod) } unset(mods) @@ -39,11 +35,7 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri unset(QT_MODULE_INCLUDE_BASE) unset(QT_MODULE_LIB_BASE) unset(QT_MODULE_HOST_LIB_BASE) - unset(QT_MODULE_PLUGIN_BASE) - unset(QT_MODULE_LIBEXEC_BASE) unset(QT_MODULE_BIN_BASE) - unset(QT_MODULE_IMPORT_BASE) - unset(QT_MODULE_QML_BASE) } load(qt_functions) diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 656a885795..2b3faeb21b 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -872,6 +872,10 @@ defineTest(qtConfTest_compile) { # can work with a regular main() entry point on Windows. qmake_configs += "console" + # for platforms with multiple architectures (macOS, iOS, tvOS, watchOS), + # make sure tests are only built for a single architecture + qmake_configs += "single_arch" + qmake_args += "\"CONFIG += $$qmake_configs\"" !$$host|!cross_compile { diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 999cd18154..c00fdb73f8 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -33,11 +33,13 @@ defineReplace(qtRelativeRPathBase) { darwin { if(equals(TEMPLATE, app):app_bundle)|\ if(equals(TEMPLATE, lib):plugin:plugin_bundle) { - ios: return($$target.path/$${TARGET}.app) + shallow_bundle: return($$target.path/$${TARGET}.app) return($$target.path/$${TARGET}.app/Contents/MacOS) } - equals(TEMPLATE, lib):!plugin:lib_bundle: \ + equals(TEMPLATE, lib):!plugin:lib_bundle { + shallow_bundle: return($$target.path/$${TARGET}.framework) return($$target.path/$${TARGET}.framework/Versions/Current) + } } return($$target.path) } diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index ec31e457db..22ead1b2b4 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -46,6 +46,9 @@ CONFIG(shared, static|shared):qtConfig(framework): \ CONFIG += relative_qt_rpath # Qt libraries should be relocatable +# Qt libraries should only use Application Extension safe APIs +darwin:!no_app_extension_api_only: CONFIG += app_extension_api_only + ucmodule = $$upper($$MODULE) isEmpty(MODULE_INCNAME): MODULE_INCNAME = $$TARGET @@ -64,6 +67,11 @@ else: \ MODULE_DEFINE = QT_$${ucmodule}_LIB MODULE_DEFINES = $$MODULE_DEFINE $$MODULE_DEFINES +# Make sure that the supporting runtime is linked into the application when +# the module is built with exceptions enabled. +integrity:CONFIG(exceptions, exceptions|exceptions_off): \ + MODULE_CONFIG += exceptions + load(qt_build_paths) header_module { @@ -264,7 +272,7 @@ load(qt_targets) QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ") QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION) for(i, MODULE_DEPENDS): \ - QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION)) + QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0)) isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module pclib_replace.match = $$lib_replace.match diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index bcaac230ec..72d676da6f 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -110,9 +110,6 @@ defineReplace(qtExportLibsForModule) { module_master = MODULE_PRI_CONT = \ "QT.$${MODULE_ID}.VERSION = $${VERSION}" \ - "QT.$${MODULE_ID}.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \ - "QT.$${MODULE_ID}.MINOR_VERSION = $$section(VERSION, ., 1, 1)" \ - "QT.$${MODULE_ID}.PATCH_VERSION = $$section(VERSION, ., 2, 2)" \ "" \ "QT.$${MODULE_ID}.name = $$TARGET" \ "QT.$${MODULE_ID}.module = $$module_module" \ @@ -122,10 +119,6 @@ defineReplace(qtExportLibsForModule) { "QT.$${MODULE_ID}.frameworks =$$MODULE_FRAMEWORKS" !host_build: MODULE_PRI_CONT += \ "QT.$${MODULE_ID}.bins = \$\$QT_MODULE_BIN_BASE" \ - "QT.$${MODULE_ID}.libexecs = \$\$QT_MODULE_LIBEXEC_BASE" \ - "QT.$${MODULE_ID}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \ - "QT.$${MODULE_ID}.imports = \$\$QT_MODULE_IMPORT_BASE" \ - "QT.$${MODULE_ID}.qml = \$\$QT_MODULE_QML_BASE" \ $$module_plugtypes MODULE_PRI_CONT += \ "QT.$${MODULE_ID}.depends =$$join(MODULE_DEPENDS, " ", " ")" \ @@ -151,9 +144,6 @@ defineReplace(qtExportLibsForModule) { private_deps ~= s,-private$,_private,g MODULE_PRIVATE_PRI_CONT = \ "QT.$${MODULE}_private.VERSION = $${VERSION}" \ - "QT.$${MODULE}_private.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \ - "QT.$${MODULE}_private.MINOR_VERSION = $$section(VERSION, ., 1, 1)" \ - "QT.$${MODULE}_private.PATCH_VERSION = $$section(VERSION, ., 2, 2)" \ "" \ "QT.$${MODULE}_private.name = $${TARGET}" \ # Same name as base module "QT.$${MODULE}_private.module =" \ @@ -181,12 +171,8 @@ defineReplace(qtExportLibsForModule) { MODULE_FWD_PRI_CONT = \ "QT_MODULE_BIN_BASE = $$val_escape(MODULE_BASE_OUTDIR)/bin" \ "QT_MODULE_INCLUDE_BASE = $$val_escape(MODULE_BASE_INCDIR)/include" \ - "QT_MODULE_IMPORT_BASE = $$val_escape(MODULE_BASE_OUTDIR)/imports" \ - "QT_MODULE_QML_BASE = $$val_escape(MODULE_BASE_OUTDIR)/qml" \ "QT_MODULE_LIB_BASE = $$val_escape(MODULE_BASE_OUTDIR)/lib" \ "QT_MODULE_HOST_LIB_BASE = $$val_escape(MODULE_BASE_OUTDIR)/lib" \ - "QT_MODULE_LIBEXEC_BASE = $$val_escape(MODULE_BASE_OUTDIR)/libexec" \ - "QT_MODULE_PLUGIN_BASE = $$val_escape(MODULE_BASE_OUTDIR)/plugins" \ "include($$val_escape(MODULE_PRI))" \ "QT.$${MODULE_ID}.priority = 1" !internal_module:!no_private_module: MODULE_FWD_PRI_CONT += \ @@ -210,12 +196,8 @@ defineReplace(qtExportLibsForModule) { # This is needed for the direct include() below. Mirrors qt_config.prf QT_MODULE_BIN_BASE = $$[QT_INSTALL_BINS] QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS] - QT_MODULE_IMPORT_BASE = $$[QT_INSTALL_IMPORTS] - QT_MODULE_QML_BASE = $$[QT_INSTALL_QML] QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS] QT_MODULE_HOST_LIB_BASE = $$[QT_HOST_LIBS] - QT_MODULE_LIBEXEC_BASE = $$[QT_INSTALL_LIBEXECS] - QT_MODULE_PLUGIN_BASE = $$[QT_INSTALL_PLUGINS] } @@ -227,7 +209,7 @@ defineReplace(qtExportLibsForModule) { for(mod, mods_to_load) { for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \ name module depends run_depends plugin_types module_config CONFIG DEFINES \ - priority includes bins libs frameworks libexecs plugins imports qml \ + priority includes bins libs frameworks \ winrt_capabilities winrt_capabilities_device \ )):defined(QT.$${mod}.$$var, var):cache(QT.$${mod}.$$var, transient) } diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf index 80d9c87e05..62e1b69fde 100644 --- a/mkspecs/features/qt_plugin.prf +++ b/mkspecs/features/qt_plugin.prf @@ -32,6 +32,9 @@ tool_plugin { CONFIG += relative_qt_rpath # Qt's plugins should be relocatable +# Qt libraries should only use Application Extension safe APIs +darwin:!no_app_extension_api_only: CONFIG += app_extension_api_only + CONFIG(static, static|shared)|prefix_build { isEmpty(MODULE): MODULE = $$basename(TARGET) diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf index d5ba70ca8c..a9fe0d76d6 100644 --- a/mkspecs/features/resolve_target.prf +++ b/mkspecs/features/resolve_target.prf @@ -31,7 +31,17 @@ win32 { mac { equals(TEMPLATE, lib) { - lib_bundle { + plugin:plugin_bundle { + !isEmpty(QMAKE_PLUGIN_BUNDLE_NAME): \ + plugin_target = $$QMAKE_PLUGIN_BUNDLE_NAME + else: \ + plugin_target = $$TARGET + QMAKE_RESOLVED_BUNDLE = $${QMAKE_RESOLVED_TARGET}$${plugin_target}.plugin + !shallow_bundle: \ + QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/Contents/MacOS/$${TARGET} + else: \ + QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}$${TARGET} + } else: !plugin:lib_bundle { !isEmpty(QMAKE_FRAMEWORK_BUNDLE_NAME): \ framework_target = $$QMAKE_FRAMEWORK_BUNDLE_NAME else: \ diff --git a/mkspecs/features/simd.prf b/mkspecs/features/simd.prf index 4aafdbe5ed..953fc52c65 100644 --- a/mkspecs/features/simd.prf +++ b/mkspecs/features/simd.prf @@ -104,6 +104,7 @@ addSimdCompiler(avx512bw) addSimdCompiler(avx512vl) addSimdCompiler(avx512ifma) addSimdCompiler(avx512vbmi) +addSimdCompiler(f16c) addSimdCompiler(neon) addSimdCompiler(mips_dsp) addSimdCompiler(mips_dspr2) diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf index c202664c47..3e1537dde0 100644 --- a/mkspecs/features/testcase.prf +++ b/mkspecs/features/testcase.prf @@ -6,6 +6,9 @@ # qt_build_config tells us to re-enable exceptions here. testcase_exceptions: CONFIG += exceptions +# Set in qt_build_config.prf +testcase_no_bundle: CONFIG -= app_bundle + benchmark: type = benchmark else: type = check diff --git a/mkspecs/features/uikit/default_post.prf b/mkspecs/features/uikit/default_post.prf index dc4effd7f1..0a2e4122f5 100644 --- a/mkspecs/features/uikit/default_post.prf +++ b/mkspecs/features/uikit/default_post.prf @@ -53,31 +53,10 @@ macx-xcode { } } -macx-xcode { - arch_device.name = "ARCHS[sdk=$${device.sdk}*]" - arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]" - - arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS - arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS - QMAKE_XCODE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS $$QMAKE_APPLE_SIMULATOR_ARCHS - - QMAKE_MAC_XCODE_SETTINGS += arch_device arch_simulator - - only_active_arch.name = ONLY_ACTIVE_ARCH - only_active_arch.value = YES - only_active_arch.build = debug - QMAKE_MAC_XCODE_SETTINGS += only_active_arch -} else { - ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS)) - ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch)) - - QMAKE_EXTRA_VARIABLES += VALID_ARCHS ACTIVE_ARCHS ARCH_ARGS - - arch_flags = $(EXPORT_ARCH_ARGS) - - QMAKE_CFLAGS += $$arch_flags - QMAKE_CXXFLAGS += $$arch_flags - QMAKE_LFLAGS += $$arch_flags - - QMAKE_PCH_ARCHS = $$VALID_ARCHS +!xcodebuild:equals(TEMPLATE, app):!isEmpty(QMAKE_INFO_PLIST) { + # Only link in photo library support if Info.plist contains + # NSPhotoLibraryUsageDescription. Otherwise it will be rejected from AppStore. + plist_path = $$absolute_path($$QMAKE_INFO_PLIST, $$_PRO_FILE_PWD_) + system("/usr/libexec/PlistBuddy -c 'Print NSPhotoLibraryUsageDescription' $$system_quote($$plist_path) &>/dev/null"): \ + QTPLUGIN += qiosnsphotolibrarysupport } diff --git a/mkspecs/features/uikit/default_pre.prf b/mkspecs/features/uikit/default_pre.prf index ecc3b9d3ab..00e29a5c8b 100644 --- a/mkspecs/features/uikit/default_pre.prf +++ b/mkspecs/features/uikit/default_pre.prf @@ -23,3 +23,6 @@ load(default_pre) # Check for supported Xcode versions lessThan(QMAKE_XCODE_VERSION, "4.3"): \ error("This mkspec requires Xcode 4.3 or later") + +ios:shared:lessThan(QMAKE_IOS_DEPLOYMENT_TARGET, "8.0"): \ + QMAKE_IOS_DEPLOYMENT_TARGET = 8.0 diff --git a/mkspecs/features/uikit/devices.pl b/mkspecs/features/uikit/devices.pl index eb45d1dab9..8d69a97273 100755 --- a/mkspecs/features/uikit/devices.pl +++ b/mkspecs/features/uikit/devices.pl @@ -2,32 +2,38 @@ ############################################################################# ## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ ## ## This file is the build configuration utility of the Qt Toolkit. ## -## $QT_BEGIN_LICENSE:LGPL21$ +## $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 http://www.qt.io/terms-conditions. For further -## information use the contact form at http://www.qt.io/contact-us. +## 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 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. +## 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. ## -## 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. +## 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$ ## diff --git a/mkspecs/features/uikit/qt_config.prf b/mkspecs/features/uikit/qt_config.prf deleted file mode 100644 index 5fa5a536f8..0000000000 --- a/mkspecs/features/uikit/qt_config.prf +++ /dev/null @@ -1,19 +0,0 @@ -load(qt_config) - -isEmpty(QT_ARCH) { - # The configure tests are run without QT_ARCH being resolved yet, which - # means we fail to pass -arch to the compiler, resulting in broke tests. - # As the Xcode toolchain doesn't seem to have a way to auto-detect the - # arch based on the SDK, we have to hard-code the arch for configure. - contains(QMAKE_MAC_SDK, $${device.sdk}.*) { - QT_ARCH = arm - } else { # Simulator - ios: QT_ARCH = i386 - tvos: QT_ARCH = x64 - watchos: QT_ARCH = i386 - } - - # Prevent the arch/config tests from building as multi-arch binaries, - # as we only want the lowest common denominator features. - CONFIG += single_arch -} diff --git a/mkspecs/features/uikit/sdk.prf b/mkspecs/features/uikit/sdk.prf index 287441c760..0bfc26211a 100644 --- a/mkspecs/features/uikit/sdk.prf +++ b/mkspecs/features/uikit/sdk.prf @@ -1,4 +1,3 @@ - load(sdk) macx-xcode { diff --git a/mkspecs/features/unix/openvg.prf b/mkspecs/features/unix/openvg.prf deleted file mode 100644 index 500dfc50c6..0000000000 --- a/mkspecs/features/unix/openvg.prf +++ /dev/null @@ -1,15 +0,0 @@ -!isEmpty(QMAKE_INCDIR_OPENVG): INCLUDEPATH += $$QMAKE_INCDIR_OPENVG -!isEmpty(QMAKE_LIBDIR_OPENVG): QMAKE_LIBDIR += -L$$QMAKE_LIBDIR_OPENVG -!isEmpty(QMAKE_LIBS_OPENVG): LIBS += $$QMAKE_LIBS_OPENVG - -qtConfig(egl) { - !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL - !isEmpty(QMAKE_LIBDIR_EGL): LIBS += -L$$QMAKE_LIBDIR_EGL - !isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL -} - -qtConfig(openvg_on_opengl) { - !isEmpty(QMAKE_INCDIR_OPENGL): INCLUDEPATH += $$QMAKE_INCDIR_OPENGL - !isEmpty(QMAKE_LIBDIR_OPENGL): QMAKE_LIBDIR += -L$$QMAKE_LIBDIR_OPENGL - !isEmpty(QMAKE_LIBS_OPENGL): LIBS += $$QMAKE_LIBS_OPENGL -} diff --git a/mkspecs/features/win32/openvg.prf b/mkspecs/features/win32/openvg.prf deleted file mode 100644 index 9d9a49d856..0000000000 --- a/mkspecs/features/win32/openvg.prf +++ /dev/null @@ -1,7 +0,0 @@ -QMAKE_LIBS += $$QMAKE_LIBS_OPENVG -QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENVG - -qtConfig(openvg_on_opengl) { - QMAKE_LIBS += $$QMAKE_LIBS_OPENGL - QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL -} diff --git a/mkspecs/features/winrt/default_pre.prf b/mkspecs/features/winrt/default_pre.prf index f79d04ce41..8b9c1d7663 100644 --- a/mkspecs/features/winrt/default_pre.prf +++ b/mkspecs/features/winrt/default_pre.prf @@ -1,15 +1,13 @@ -*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 - # due to deleting an item from a different heap. - # vcruntime(d) is necessary when we don't link to any libraries - # which would pull it in transitively. - CONFIG(debug, debug|release): \ - QMAKE_LIBS = ucrtd.lib vcruntimed.lib $$QMAKE_LIBS - else: \ - QMAKE_LIBS = ucrt.lib vcruntime.lib $$QMAKE_LIBS -} +# Note that the order is important - ucrt(d) has to be first. +# Otherwise, the linker might use malloc from a different library, +# but free_dbg() from the runtime, causing an assertion failure +# due to deleting an item from a different heap. +# vcruntime(d) is necessary when we don't link to any libraries +# which would pull it in transitively. +CONFIG(debug, debug|release): \ + QMAKE_LIBS = ucrtd.lib vcruntimed.lib $$QMAKE_LIBS +else: \ + QMAKE_LIBS = ucrt.lib vcruntime.lib $$QMAKE_LIBS equals(TEMPLATE, "vcapp"): CONFIG += windeployqt diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf index e0e421ed9a..8f4a7a6eab 100644 --- a/mkspecs/features/winrt/package_manifest.prf +++ b/mkspecs/features/winrt/package_manifest.prf @@ -59,7 +59,6 @@ # Provide the C-runtime dependency equals(TEMPLATE, "app") { VCLIBS = Microsoft.VCLibs.$$replace(MSVC_VER, \\., ).00 - winphone: VCLIBS = $${VCLIBS}.Phone CONFIG(debug, debug|release): \ VCLIBS = $${VCLIBS}.Debug else: \ @@ -103,7 +102,6 @@ INDENT = "$$escape_expand(\\r\\n) " VS_XML_NAMESPACE = "m2" - winphone: VS_XML_NAMESPACE = "m3" WINRT_MANIFEST.rotation_preference = $$unique(WINRT_MANIFEST.rotation_preference) !isEmpty(WINRT_MANIFEST.rotation_preference) { MANIFEST_ROTATION += "<$${VS_XML_NAMESPACE}:InitialRotationPreference>" @@ -150,10 +148,8 @@ # is already inside the MSVC2015 manifest. WINRT_MANIFEST.dependencies = $$unique(WINRT_MANIFEST.dependencies) !isEmpty(WINRT_MANIFEST.dependencies) { - *-msvc2013: MANIFEST_DEPENDENCIES += "<Dependencies>" for(DEPENDENCY, WINRT_MANIFEST.dependencies): \ MANIFEST_DEPENDENCIES += " <PackageDependency Name=\"$$DEPENDENCY\" />" - *-msvc2013: MANIFEST_DEPENDENCIES += "</Dependencies>" WINRT_MANIFEST.dependencies = $$join(MANIFEST_DEPENDENCIES, $$INDENT, $$INDENT) } |