diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-01-03 14:20:01 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-01-04 11:12:05 +0100 |
commit | ca2f44680cb97e7a7c46ee0ab26654822fe65e2d (patch) | |
tree | b9d85ad8ec1b18a6aa56b7657812cf3791bdf72e /mkspecs | |
parent | 28a21d98ef8d880a6dd86ee19dd803424bb5eae1 (diff) | |
parent | 83188c6499ccdc87c0a2c468bb497e287f5db369 (diff) |
Merge branch 'stable' into dev
Conflicts:
examples/widgets/painting/shared/shared.pri
src/corelib/tools/qharfbuzz_p.h
src/corelib/tools/qunicodetools.cpp
src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
src/plugins/platforms/windows/qwindowsfontdatabase.cpp
Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
Diffstat (limited to 'mkspecs')
43 files changed, 528 insertions, 189 deletions
diff --git a/mkspecs/common/gcc-base-unix.conf b/mkspecs/common/gcc-base-unix.conf index dc8d7e42cd..dadaecaa29 100644 --- a/mkspecs/common/gcc-base-unix.conf +++ b/mkspecs/common/gcc-base-unix.conf @@ -15,6 +15,7 @@ QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_SONAME += -Wl,-soname, QMAKE_LFLAGS_THREAD += QMAKE_LFLAGS_RPATH = -Wl,-rpath, +QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link, # -Bsymbolic-functions (ld) support QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions diff --git a/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp b/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp index 1ee95f1f24..7a6c1d3fce 100644 --- a/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp +++ b/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp @@ -61,7 +61,7 @@ private: QEglFSImx6Hooks::QEglFSImx6Hooks() { int width, height; - mNativeDisplay = fbGetDisplay(); + mNativeDisplay = fbGetDisplayByIndex(0); fbGetDisplayGeometry(mNativeDisplay, &width, &height); mScreenSize.setHeight(height); mScreenSize.setWidth(width); @@ -76,7 +76,7 @@ EGLNativeWindowType QEglFSImx6Hooks::createNativeWindow(const QSize &size, const { Q_UNUSED(format); - EGLNativeWindowType eglWindow = fbCreateWindow(mNativeDisplay, 0, 1, size.width(), size.height()); + EGLNativeWindowType eglWindow = fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height()); return eglWindow; } diff --git a/mkspecs/devices/linux-imx6-g++/qmake.conf b/mkspecs/devices/linux-imx6-g++/qmake.conf index 67e16f2d29..322a19d05b 100644 --- a/mkspecs/devices/linux-imx6-g++/qmake.conf +++ b/mkspecs/devices/linux-imx6-g++/qmake.conf @@ -8,7 +8,7 @@ # /home/tsenyk/qt5/qt5/configure -opensource -confirm-license -make libs -device imx6 \ # -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- \ # -sysroot <path-to-your-ltib-install>/rootfs -no-gcc-sysroot \ -# -prefix /usr/local/Trolltech/Qt5-imx6-1 +# -prefix /usr/local/Qt-5.0.0/Qt5-imx6-1 # # NOTE: currently ltib doesn't produce a proper staging/sysroot-filessystem. # If gcc's --sysroot is used, the toolchain doesn't find basic binaries (e.g. crt1.o), diff --git a/mkspecs/devices/linux-tegra2-g++/qmake.conf b/mkspecs/devices/linux-tegra2-g++/qmake.conf index c480def19c..c846801a10 100644 --- a/mkspecs/devices/linux-tegra2-g++/qmake.conf +++ b/mkspecs/devices/linux-tegra2-g++/qmake.conf @@ -4,7 +4,7 @@ # This mkspec is based and tested on the TrimSlice using "Ubuntu Natty (11.04) - l4t.r15.01"-release. # It might work with other boards and releases as well. # A typical configure line looks like this: -# <path-to-qt-src>/configure -opensource -confirm-license -make libs -prefix /usr/local/Trolltech/Qt5-tegra2 +# <path-to-qt-src>/configure -opensource -confirm-license -make libs -prefix /usr/local/Qt-5.0.0/Qt5-tegra2 # -device tegra2 -device-option CROSS_COMPILE=<path-to-crosstoolchain>/bin/arm-none-linux-gnueabi- \ # -sysroot <path-to-rootfs> -no-neon diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 9548c5e0ff..63001f3e89 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -1,3 +1,13 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# defineReplace(cmakeModuleName) { _module = $$1 @@ -17,7 +27,7 @@ defineReplace(cmakeModuleList) { CMAKE_MODULE_NAME = $$cmakeModuleName($${MODULE}) -CMAKE_MODULE_DEPS = $$cmakeModuleList($$eval(QT.$${MODULE}.depends)) +CMAKE_MODULE_DEPS = $$cmakeModuleList($$sort_depends(QT.$${MODULE}.depends, QT.)) CMAKE_PARTIAL_MODULE_DEPS = $$replace(CMAKE_MODULE_DEPS, ";", ";Qt5::") !isEmpty(CMAKE_PARTIAL_MODULE_DEPS):CMAKE_QT5_MODULE_DEPS = "Qt5::$${CMAKE_PARTIAL_MODULE_DEPS}" @@ -49,16 +59,16 @@ contains(CMAKE_BIN_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") { CMAKE_BIN_DIR_IS_ABSOLUTE = True } -CMAKE_DATA_DIR = $$[QT_INSTALL_DATA]/ # For the mkspecs -contains(CMAKE_DATA_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") { - CMAKE_DATA_DIR = $$replace(CMAKE_DATA_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", ) +CMAKE_ARCHDATA_DIR = $$[QT_INSTALL_ARCHDATA]/ # For the mkspecs +contains(CMAKE_ARCHDATA_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") { + CMAKE_ARCHDATA_DIR = $$replace(CMAKE_ARCHDATA_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", ) } else { - CMAKE_DATA_DIR_IS_ABSOLUTE = True + CMAKE_ARCHDATA_DIR_IS_ABSOLUTE = True } static|staticlib:CMAKE_STATIC_TYPE = true -contains(QT_CONFIG, reduce_relocations):CMAKE_ADD_FPIE_FLAGS = "true" +unix:contains(QT_CONFIG, reduce_relocations):CMAKE_ADD_FPIE_FLAGS = "true" CMAKE_MKSPEC = $$[QMAKE_XSPEC] @@ -155,12 +165,12 @@ if (build_all|CONFIG(release, debug|release)):CMAKE_RELEASE_TYPE = release INSTALLS += cmake_qt5_module_files -cmake_config_file.input = $$PWD/../cmake/Qt5BasicConfig.cmake.in +cmake_config_file.input = $$PWD/data/cmake/Qt5BasicConfig.cmake.in cmake_config_file.output = $$DESTDIR/cmake/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Config.cmake CMAKE_PACKAGE_VERSION = $$eval(QT.$${MODULE}.VERSION) -cmake_config_version_file.input = $$PWD/../cmake/Qt5ConfigVersion.cmake.in +cmake_config_version_file.input = $$PWD/data/cmake/Qt5ConfigVersion.cmake.in cmake_config_version_file.output = $$DESTDIR/cmake/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake !build_pass:QMAKE_SUBSTITUTES += \ diff --git a/mkspecs/features/ctest_testcase.prf b/mkspecs/features/ctest_testcase.prf index de61ae96cb..93ebd4607d 100644 --- a/mkspecs/features/ctest_testcase.prf +++ b/mkspecs/features/ctest_testcase.prf @@ -53,4 +53,6 @@ insignificant_test:!isEmpty(check.commands) { check.commands = -$${check.commands} } +!qtHaveModule(widgets): CONFIG += insignificant_test # QTBUG-28540 + QMAKE_EXTRA_TARGETS *= check diff --git a/mkspecs/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index 36d0495222..36d0495222 100644 --- a/mkspecs/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in diff --git a/mkspecs/cmake/Qt5ConfigVersion.cmake.in b/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in index e804754912..e804754912 100644 --- a/mkspecs/cmake/Qt5ConfigVersion.cmake.in +++ b/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in diff --git a/mkspecs/features/data/headersclean/tst_headersclean.cpp.in b/mkspecs/features/data/headersclean/tst_headersclean.cpp.in new file mode 100644 index 0000000000..c3aa9a9562 --- /dev/null +++ b/mkspecs/features/data/headersclean/tst_headersclean.cpp.in @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/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 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt 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 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#define signals int +#define slots int +#define emit public:; +#define foreach public:; +#define forever public:; + +$${includes} +#include <QtCore/qglobal.h> + +int main(int, char **) +{ + qWarning(\"This is a compile test only\"); + return 0; +} diff --git a/mkspecs/features/dbuscommon.pri b/mkspecs/features/dbuscommon.pri index fce2d04967..4608fb6ca2 100644 --- a/mkspecs/features/dbuscommon.pri +++ b/mkspecs/features/dbuscommon.pri @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + load(moc) qtPrepareTool(QMAKE_QDBUSXML2CPP, qdbusxml2cpp) diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index 6f3f318e0a..3afab5240e 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -1,3 +1,5 @@ +# This file is loaded by qmake right after loading the actual project file. + contains(TEMPLATE, ".*(lib|app)"):CONFIG += have_target !have_target:!force_qt: CONFIG -= qt @@ -47,12 +49,3 @@ breakpad { QMAKE_INCDIR += $$QMAKE_INCDIR_POST QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST - -# Let every project have a standard GNU `check' target -!contains(QMAKE_EXTRA_TARGETS, check) { - contains(TEMPLATE, subdirs): \ - prepareRecursiveTarget(check) - else: \ - check.depends = first # `make check' implies build - QMAKE_EXTRA_TARGETS += check -} diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf index 0dd82ee072..b06b9d6cfc 100644 --- a/mkspecs/features/default_pre.prf +++ b/mkspecs/features/default_pre.prf @@ -1,2 +1,9 @@ +# This file is loaded by qmake right before each actual project file. +# Note that evaluating variable assignments from the command line +# still happens in between these two steps. + load(exclusive_builds) -CONFIG = lex yacc warn_on debug exceptions depend_includepath $$CONFIG +CONFIG = \ + lex yacc debug exceptions depend_includepath \ + testcase_targets import_plugins import_qpa_plugin \ + $$CONFIG diff --git a/mkspecs/features/device_config.prf b/mkspecs/features/device_config.prf index a4dd6253cc..cb1de0b947 100644 --- a/mkspecs/features/device_config.prf +++ b/mkspecs/features/device_config.prf @@ -1,3 +1,5 @@ +# This file is loaded by some qmakespecs to get early configuration data. + # Load generated qdevice.pri DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri exists($$DEVICE_PRI):include($$DEVICE_PRI) diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index 250f57a265..8bd512844d 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -79,10 +79,7 @@ QMAKE_EXTRA_COMPILERS += moc_source INCREDIBUILD_XGE += moc_source #make sure we can include these files -moc_dir_short = $$MOC_DIR -contains(QMAKE_HOST.os,Windows):moc_dir_short ~= s,^.:,/, -contains(moc_dir_short, ^[/\\\\].*):INCLUDEPATH += $$MOC_DIR -else:INCLUDEPATH += $$OUT_PWD/$$MOC_DIR +INCLUDEPATH += $$absolute_path($$MOC_DIR, $$OUT_PWD) #auto depend on moc unix:!no_mocdepend { diff --git a/mkspecs/features/qml1_module.prf b/mkspecs/features/qml1_module.prf index 8bacddc549..33c3e44808 100644 --- a/mkspecs/features/qml1_module.prf +++ b/mkspecs/features/qml1_module.prf @@ -1,2 +1,13 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + CONFIG += qml1_target load(qml_module) diff --git a/mkspecs/features/qml1_plugin.prf b/mkspecs/features/qml1_plugin.prf index 2914c78ea3..cb1f0ce267 100644 --- a/mkspecs/features/qml1_plugin.prf +++ b/mkspecs/features/qml1_plugin.prf @@ -1,2 +1,13 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + CONFIG += qml1_target load(qml_plugin) diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index a452592c9b..e7d0b386b1 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + equals(TEMPLATE, app): TEMPLATE = aux isEmpty(TARGETPATH): error("Must set TARGETPATH (QML import name)") diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index c700dda41f..7abd372e49 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + load(qt_build_config) TEMPLATE = lib diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 586dae3981..9e36b6da16 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -2,17 +2,12 @@ CONFIG *= thread #handle defines win32 { - # ### QT_NODLL and QT_DLL are compatibility, remove before the Qt 5.0 release contains(QT_CONFIG, shared) { - DEFINES += QT_DLL - # this variable is read by qmake in qmake/generators/win32/msvc_vcproj.cpp # function VcprojGenerator::initDeploymentTool(), which contains some hardcoded # library names (the ones that were static in Qt 4) # it probably doesn't work anymore and should not be in this file QMAKE_QT_DLL = 1 - } else { - DEFINES += QT_NODLL } } CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG @@ -35,40 +30,6 @@ plugin { #Qt plugins } } -QT_PLUGIN_VERIFY = QTPLUGIN DEPLOYMENT_PLUGIN -for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) { - for(QTPLUG, $$list($$lower($$unique($$QT_CURRENT_VERIFY)))) { - # Check if the plugin is known to Qt. We can use this to determine - # the plugin path. Unknown plugins must rely on the default link path. - QT_PLUGINPATH = $$eval(QT_PLUGIN.$${QTPLUG}.TYPE) - - # Generate the plugin linker line - target_qt:isEqual(TARGET, QTPLUG) { - warning($$TARGET cannot have a QTPLUGIN of $$QTPLUG) - } else { - QT_LINKAGE = -l$${QTPLUG}$$qtPlatformTargetSuffix() - } - - # Only link against plugin in static builds - isEqual(QT_CURRENT_VERIFY, QTPLUGIN): { - !isEmpty(QT_PLUGINPATH): LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/$$QT_PLUGINPATH - LIBS += $$QT_LINKAGE - # if the plugin is linked statically there is no need to deploy it - DEPLOYMENT_PLUGIN -= $$QT_CURRENT_VERIFY - } - isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:wince*: { - QT_ITEM = - CONFIG(debug, debug|release): QT_ITEM = $${QTPLUG}d4.dll - else: QT_ITEM = $${QTPLUG}4.dll - - eval(qt_additional_plugin_$${QTPLUG}.files = $$[QT_INSTALL_PLUGINS/get]/$${QT_PLUGINPATH}/$${QT_ITEM}) - eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH}) - - DEPLOYMENT *= qt_additional_plugin_$${QTPLUG} - } - } -} - qtestlib { warning("CONFIG+=qtestlib is deprecated. Use QT+=testlib instead.") QT += testlib @@ -110,3 +71,66 @@ qtAddModules(QT_PRIVATE, LIBS_PRIVATE) wince*:static:gui { QTLIB += qmenu_wce.res } + +QT_PLUGIN_VERIFY = DEPLOYMENT_PLUGIN +contains(QT_CONFIG, static) { + QT_PLUGIN_VERIFY += QTPLUGIN + force_import_plugins|contains(TEMPLATE, .*app) { + needs_qpa_plugin:import_qpa_plugin { + qpa_minimal_plugin: \ + QTPLUGIN += qminimal + else: \ + QTPLUGIN += $$QT_DEFAULT_QPA_PLUGIN + } + import_plugins:!isEmpty(QTPLUGIN) { + IMPORT_FILE_CONT = \ + "// This file is autogenerated by qmake. It imports static plugin classes for" \ + "// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables." \ + "$${LITERAL_HASH}include <QtPlugin>" + for(IMPORT_PLUG, $$list($$unique(QTPLUGIN))) { + PLUG_CLASS = $$eval(QT_PLUGIN.$${IMPORT_PLUG}.CLASS_NAME) + !isEmpty(PLUG_CLASS): \ + IMPORT_FILE_CONT += "Q_IMPORT_PLUGIN($$PLUG_CLASS)" + else: \ + warning("Plugin class name could not be determined for $$IMPORT_PLUG plugin.") + } + IMPORT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_plugin_import.cpp + write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error("Aborting.") + SOURCES += $$IMPORT_CPP + QMAKE_DISTCLEAN += $$IMPORT_CPP + } + } +} + +for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) { + for(QTPLUG, $$list($$lower($$unique($$QT_CURRENT_VERIFY)))) { + # Check if the plugin is known to Qt. We can use this to determine + # the plugin path. Unknown plugins must rely on the default link path. + QT_PLUGINPATH = $$eval(QT_PLUGIN.$${QTPLUG}.TYPE) + + # Generate the plugin linker line + target_qt:isEqual(TARGET, QTPLUG) { + warning($$TARGET cannot have a QTPLUGIN of $$QTPLUG) + } else { + QT_LINKAGE = -l$${QTPLUG}$$qtPlatformTargetSuffix() + } + + # Only link against plugin in static builds + isEqual(QT_CURRENT_VERIFY, QTPLUGIN): { + !isEmpty(QT_PLUGINPATH): LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/$$QT_PLUGINPATH + LIBS += $$QT_LINKAGE + # if the plugin is linked statically there is no need to deploy it + DEPLOYMENT_PLUGIN -= $$QT_CURRENT_VERIFY + } + isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:wince*: { + QT_ITEM = + CONFIG(debug, debug|release): QT_ITEM = $${QTPLUG}d4.dll + else: QT_ITEM = $${QTPLUG}4.dll + + eval(qt_additional_plugin_$${QTPLUG}.files = $$[QT_INSTALL_PLUGINS/get]/$${QT_PLUGINPATH}/$${QT_ITEM}) + eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH}) + + DEPLOYMENT *= qt_additional_plugin_$${QTPLUG} + } + } +} diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index 63d6b43c7c..48d6001aa9 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + !contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) { QMAKE_QT_MODULE = $$[QT_HOST_DATA/get]/mkspecs/qmodule.pri !exists($$QMAKE_QT_MODULE)|!include($$QMAKE_QT_MODULE, "", true) { @@ -28,7 +39,6 @@ mac { CONFIG += \ create_prl link_prl \ prepare_docs qt_docs_targets \ - qt_example_installs \ no_private_qt_headers_warning QTDIR_build \ # Qt modules get compiled without exceptions enabled by default. # However, testcases should be still built with exceptions. diff --git a/mkspecs/features/qt_build_paths.prf b/mkspecs/features/qt_build_paths.prf index 5f6f08c3db..123c87de3b 100644 --- a/mkspecs/features/qt_build_paths.prf +++ b/mkspecs/features/qt_build_paths.prf @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + # Find the module's source root dir. isEmpty(_QMAKE_CONF_): error("Project has no top-level .qmake.conf file.") MODULE_PROFILE_DIR = $$dirname(_QMAKE_CONF_) diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf index 3b2b62e139..061399d78c 100644 --- a/mkspecs/features/qt_config.prf +++ b/mkspecs/features/qt_config.prf @@ -1,3 +1,5 @@ +# This file is loaded as one of the last things by all qmakespecs. + QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri !exists($$QMAKE_QT_CONFIG)|!include($$QMAKE_QT_CONFIG, "", true) { debug(1, "Cannot load qconfig.pri!") diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf index 3eb138b96d..99759c6da1 100644 --- a/mkspecs/features/qt_docs.prf +++ b/mkspecs/features/qt_docs.prf @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + !exists($$QMAKE_DOCS): error("Cannot find documentation specification file $$QMAKE_DOCS") load(qt_build_paths) @@ -17,7 +28,6 @@ doc_command = $$QDOC $$QMAKE_DOCS prepare_docs { prepare_docs.commands += $$doc_command -prepare -no-link-errors generate_docs.commands += $$doc_command -generate - html_docs.depends += generate_docs } else { html_docs.commands += $$doc_command } @@ -28,12 +38,12 @@ prepare_docs { inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR inst_html_docs.path = $$[QT_INSTALL_DOCS] - inst_html_docs.CONFIG += no_check_exist directory no_default_install + inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build INSTALLS += inst_html_docs inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch inst_qch_docs.path = $$[QT_INSTALL_DOCS] - inst_qch_docs.CONFIG += no_check_exist no_default_install + inst_qch_docs.CONFIG += no_check_exist no_default_install no_build INSTALLS += inst_qch_docs install_html_docs.depends = install_inst_html_docs diff --git a/mkspecs/features/qt_docs_targets.prf b/mkspecs/features/qt_docs_targets.prf index 0d9f90bce2..89f080cc5e 100644 --- a/mkspecs/features/qt_docs_targets.prf +++ b/mkspecs/features/qt_docs_targets.prf @@ -1,37 +1,45 @@ -!contains(QMAKE_EXTRA_TARGETS, docs) { - contains(TEMPLATE, subdirs) { - prepare_docs { - prepareRecursiveTarget(prepare_docs) - prepareRecursiveTarget(generate_docs) - html_docs.commands = $(MAKE) -f $(MAKEFILE) prepare_docs && $(MAKE) -f $(MAKEFILE) generate_docs - } else { - prepareRecursiveTarget(html_docs) - } - prepareRecursiveTarget(qch_docs) - prepareRecursiveTarget(docs) - } else { - # apps and libs only generate docs if QMAKE_DOCS is set - !isEmpty(QMAKE_DOCS) { - # backwards compat hack - load(qt_docs) - } - } - docs.commands = $(MAKE) -f $(MAKEFILE) html_docs && $(MAKE) -f $(MAKEFILE) qch_docs - QMAKE_EXTRA_TARGETS += html_docs qch_docs docs - prepare_docs: QMAKE_EXTRA_TARGETS += prepare_docs generate_docs +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + +DOC_TARGETS = \ + install_html_docs uninstall_html_docs \ + install_qch_docs uninstall_qch_docs \ + install_docs uninstall_docs \ + qch_docs + +prepare_docs { + DOC_TARGETS += prepare_docs generate_docs + html_docs.commands = $(MAKE) -f $(MAKEFILE) prepare_docs && $(MAKE) -f $(MAKEFILE) generate_docs + QMAKE_EXTRA_TARGETS += html_docs +} else { + DOC_TARGETS += html_docs } -!contains(QMAKE_EXTRA_TARGETS, install_docs) { - contains(TEMPLATE, subdirs) { - prepareRecursiveTarget(install_html_docs) - prepareRecursiveTarget(uninstall_html_docs) - prepareRecursiveTarget(install_qch_docs) - prepareRecursiveTarget(uninstall_qch_docs) - prepareRecursiveTarget(install_docs) - prepareRecursiveTarget(uninstall_docs) +docs.commands = $(MAKE) -f $(MAKEFILE) html_docs && $(MAKE) -f $(MAKEFILE) qch_docs +QMAKE_EXTRA_TARGETS += docs + +contains(TEMPLATE, subdirs) { + for(inst, DOC_TARGETS): \ + prepareRecursiveTarget($$inst) +} else:debug_and_release:!build_pass { + sub = $$first(BUILDS) + for(inst, DOC_TARGETS) { + $${inst}.CONFIG = recursive + $${inst}.recurse = $$sub + } +} else { + # apps and libs only generate docs if QMAKE_DOCS is set + !isEmpty(QMAKE_DOCS) { + # backwards compat hack + load(qt_docs) } - QMAKE_EXTRA_TARGETS += \ - install_html_docs uninstall_html_docs \ - install_qch_docs uninstall_qch_docs \ - install_docs uninstall_docs } +QMAKE_EXTRA_TARGETS += $$DOC_TARGETS diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf index 72f0b141a7..5417469909 100644 --- a/mkspecs/features/qt_example_installs.prf +++ b/mkspecs/features/qt_example_installs.prf @@ -1,5 +1,16 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) -!contains(probase, ^\\..*) { +!isEmpty(probase):!contains(probase, ^\\..*) { for(ex, EXAMPLE_FILES): \ sourcefiles += $$files($$absolute_path($$ex, $$_PRO_FILE_PWD_)) for(res, RESOURCES) { @@ -21,6 +32,7 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) extras = \ $$_PRO_FILE_PWD_/README \ $$files($$_PRO_FILE_PWD_/*.pri) \ + $$replace(_PRO_FILE_, \\.pro$, .qmlproject) \ $$replace(_PRO_FILE_, \\.pro$, .json) \ $$replace(_PRO_FILE_, \\.pro$, .inf) for(extra, extras): \ @@ -30,6 +42,10 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) # Just for Qt Creator OTHER_FILES += $$sourcefiles + for(inst, INSTALLS): \ + !equals(inst, target):!contains($${inst}.CONFIG, no_check_exist): \ + for(file, $${inst}.files): \ + sourcefiles += $$files($$absolute_path($$file, $$_PRO_FILE_PWD_)) sourcefiles += \ $$_PRO_FILE_ $$RC_FILE $$DEF_FILE \ $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \ diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index d73d402b0c..389f2418ad 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -51,6 +51,13 @@ defineTest(qtProcessModuleFlags) { export($$1) } +# qt module +defineTest(qtHaveModule) { + !isEmpty(QT.$${1}.name): \ + return(true) + return(false) +} + # qt module, UsePrivate flag, libs variable defineTest(qtAddModule) { MODULE_NAME = $$eval(QT.$${1}.name) @@ -63,7 +70,8 @@ defineTest(qtAddModule) { qtProcessModuleFlags(DEFINES, QT.$${1}.DEFINES) MODULE_INCLUDES -= $$QMAKE_DEFAULT_INCDIRS - MODULE_LIBS -= $$QMAKE_DEFAULT_LIBDIRS + MODULE_LIBS_ADD = $$MODULE_LIBS + MODULE_LIBS_ADD -= $$QMAKE_DEFAULT_LIBDIRS INCLUDEPATH *= $$MODULE_INCLUDES auto_use_privates|isEqual(2, UsePrivate) { # Tests function parameter 2 ($$2) being equal to 'UsePrivate' @@ -100,7 +108,7 @@ defineTest(qtAddModule) { } isEmpty(LINKAGE) { - !isEmpty(MODULE_LIBS): LINKAGE = -L$$MODULE_LIBS + !isEmpty(MODULE_LIBS_ADD): LINKAGE = -L$$MODULE_LIBS_ADD lib = if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { win32: lib = $${MODULE_NAME}$${QT_LIBINFIX}d @@ -115,19 +123,19 @@ defineTest(qtAddModule) { PRE_TARGETDEPS *= $$MODULE_LIBS/$${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB} # Make sure we can link to uninstalled libraries - unix:!mac:!isEmpty(QT.$${1}.libs) { # Use unmodified path, so /usr/lib also works + !isEmpty(MODULE_LIBS) { for(rpl, QT.$${1}.rpath_link): \ - QMAKE_LFLAGS *= -Wl,-rpath-link,$$rpl + QMAKE_RPATHLINKDIR *= $$rpl !auto_use_privates:!isEqual(2, UsePrivate): \ for(rpl, QT.$${1}.rpath_link_private): \ - QMAKE_LFLAGS *= -Wl,-rpath-link,$$rpl + QMAKE_RPATHLINKDIR *= $$rpl } } # Only link to this module if a libs directory is set, else this is just a module # to give access to sources or include files, and not for linking. - !isEmpty(QT.$${1}.libs) { # Use unmodified path, so /usr/lib also works + !isEmpty(MODULE_LIBS) { !isEmpty(QMAKE_LSB) { - !isEmpty(MODULE_LIBS): QMAKE_LFLAGS *= --lsb-libpath=$$MODULE_LIBS + !isEmpty(MODULE_LIBS_ADD): QMAKE_LFLAGS *= --lsb-libpath=$$MODULE_LIBS_ADD QMAKE_LIBDIR *= /opt/lsb/lib QMAKE_LFLAGS *= --lsb-shared-libs=$${MODULE_NAME}$${QT_LIBINFIX} } @@ -139,6 +147,7 @@ defineTest(qtAddModule) { export(QMAKE_LFLAGS) export(QMAKE_LIBDIR) export(QMAKE_RPATHDIR) + export(QMAKE_RPATHLINKDIR) export(PRE_TARGETDEPS) return(true) } diff --git a/mkspecs/features/qt_headersclean.prf b/mkspecs/features/qt_headersclean.prf new file mode 100644 index 0000000000..4128392997 --- /dev/null +++ b/mkspecs/features/qt_headersclean.prf @@ -0,0 +1,51 @@ +# The headersclean test attempts to ensure all public Qt headers +# abide by various rules. +# +# To use this test, create a project which contains nothing else than a +# QT= line with the modules you want to test (no presence conditionals needed), +# followed by load(qt_headersclean). + +*-g++*: QMAKE_CXXFLAGS += -W -Wall -Wextra -Werror + +# The flags here come from http://wiki.qt-project.org/Coding_Conventions#Conventions_for_public_header_files +# -Wold-style-cast cannot be used, /usr/include/bits/byteswap.h defines the macro bswap_16 using C style casts :( +# -Wfloat-equal cannot be used, qrect.h and qvector2d.h do exact comparisons in isNull and operator==. Would need #pragmas. +*-g++*: QMAKE_CXXFLAGS += -Woverloaded-virtual -Wshadow -Wundef + +# Other nice flags +*-g++*: QMAKE_CXXFLAGS += -Wnon-virtual-dtor -ansi -Wcast-align -Wchar-subscripts -Wpointer-arith -Wformat-security + +# Enable pedantic mode, but accept variadic macros and 'long long' usage. +*-g++*: QMAKE_CXXFLAGS += -Wno-long-long -Wno-variadic-macros -pedantic-errors + +contains(QT_ARCH,arm)|contains(QT_ARCH,mips) { + # There are outstanding alignment issues in some container classes. + *-g++*:QMAKE_CXXFLAGS -= -Wcast-align +} + +QMAKE_CXXFLAGS += -DQT_NO_CAST_TO_ASCII \ + -DQT_NO_CAST_FROM_ASCII \ + -DQT_STRICT_ITERATORS \ + -DQT_NO_URL_CAST_FROM_STRING \ + -DQT_NO_CAST_FROM_BYTEARRAY \ + -DQT_NO_KEYWORDS \ + -DQT_USE_FAST_CONCATENATION \ + -DQT_USE_FAST_OPERATOR_PLUS + +TARGET = tst_headersclean + +includes = +for(q, QT) { + qn = $$eval(QT.$${q}.name) + isEmpty(qn): \ + QT -= $$q + else: \ + includes += "$${LITERAL_HASH}include <$$qn/$$qn>" +} +includes = $$join(includes, $$escape_expand(\\n)) + +testfile.input = $$PWD/data/headersclean/tst_headersclean.cpp.in +testfile.output = $$OUT_PWD/tst_headersclean.cpp +QMAKE_SUBSTITUTES += testfile + +SOURCES += $$testfile.output diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf index 0e860cccca..cc720ac8c0 100644 --- a/mkspecs/features/qt_installs.prf +++ b/mkspecs/features/qt_installs.prf @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + #library !qt_no_install_library { win32 { diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index eb46481c70..19cdc2a26a 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + !no_qt_module_warning:!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) { QMAKE_ACTUAL_PRO_FILE = $$basename(_PRO_FILE_) isEmpty(QMAKE_ACTUAL_PRO_FILE): QMAKE_ACTUAL_PRO_FILE=.pro @@ -35,19 +46,15 @@ else: \ MODULE_DEFINES = $$MODULE_DEFINE $$MODULE_DEFINES load(qt_build_paths) - -# This check will be removed soon. Weird indentation to avoid reindenting the code later. -!isEmpty(MODULE_PRI) { - !build_pass:warning("$$_PRO_FILE_ still sets MODULE_PRI. Not auto-generating module .pri file.") - MODULE_PRI = $$absolute_path($$MODULE_PRI, $$_PRO_FILE_PWD_) - exists($$MODULE_PRI)|error("Specified module pri file $$MODULE_PRI does not exist.") -} else { - MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri !build_pass { # Create a module .pri file + unix:!static: \ + module_rpath = "QT.$${MODULE}.rpath = $$[QT_INSTALL_LIBS/raw]" + else: \ + module_rpath = !isEmpty(QT_FOR_PRIVATE) { contains(QT_FOR_PRIVATE, .*-private$):error("QT_FOR_PRIVATE may not contain *-private.") module_privdep = "QT.$${MODULE}.private_depends = $$QT_FOR_PRIVATE" @@ -79,10 +86,9 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri "QT.$${MODULE}.bins = \$\$QT_MODULE_BIN_BASE" \ "QT.$${MODULE}.includes = $$MODULE_INCLUDES" \ "QT.$${MODULE}.private_includes = $$MODULE_PRIVATE_INCLUDES" \ - "QT.$${MODULE}.sources = $$val_escape(_PRO_FILE_PWD_)" \ "QT.$${MODULE}.libs = \$\$QT_MODULE_LIB_BASE" \ "QT.$${MODULE}.libexecs = \$\$QT_MODULE_LIBEXEC_BASE" \ - "QT.$${MODULE}.rpath = $$[QT_INSTALL_LIBS/raw]" \ + $$module_rpath \ "QT.$${MODULE}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \ "QT.$${MODULE}.imports = \$\$QT_MODULE_IMPORT_BASE" \ "QT.$${MODULE}.qml = \$\$QT_MODULE_QML_BASE" \ @@ -97,8 +103,6 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri } # !build_pass -} # isEmpty(MODULE_PRI) - load(qt_module_fwdpri) INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}.private_includes) @@ -110,7 +114,6 @@ TEMPLATE = lib DESTDIR = $$eval(QT.$${MODULE}.libs) win32:!wince*:exists($$[QT_INSTALL_PREFIX]/.qmake.cache): DLLDESTDIR = $$eval(QT.$${MODULE}.bins) -CONFIG += qt warn_on depend_includepath CONFIG += qmake_cache target_qt QMAKE_DOCS_TARGETDIR = qt$${MODULE} @@ -181,21 +184,22 @@ load(qt_installs) unix|win32-g++* { CONFIG += create_pc QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw] - QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]/$$MODULE_INCNAME - QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS/raw] + QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw] + QMAKE_PKGCONFIG_CFLAGS = -I${includedir}/$$MODULE_INCNAME QMAKE_PKGCONFIG_DESTDIR = pkgconfig - include_replace.match = $$[QT_INSTALL_HEADERS/get] + !isEmpty(_QMAKE_SUPER_CACHE_): \ + rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]* + else: \ + rplbase = $$[QT_INSTALL_PREFIX/get] + include_replace.match = $$rplbase/include include_replace.replace = $$[QT_INSTALL_HEADERS/raw] - lib_replace.match = $$[QT_INSTALL_LIBS/get] + lib_replace.match = $$rplbase/lib lib_replace.replace = $$[QT_INSTALL_LIBS/raw] - prefix_replace.match = $$QT_BUILD_TREE - prefix_replace.replace = $$[QT_INSTALL_PREFIX/raw] - QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace prefix_replace + QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace } unix { CONFIG += create_libtool explicitlib - QMAKE_PRL_LIBDIR = $$[QT_INSTALL_LIBS/raw] ### XXX QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS/raw] QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace diff --git a/mkspecs/features/qt_module_fwdpri.prf b/mkspecs/features/qt_module_fwdpri.prf index b7270aea59..58b016803e 100644 --- a/mkspecs/features/qt_module_fwdpri.prf +++ b/mkspecs/features/qt_module_fwdpri.prf @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + !build_pass { load(qt_build_paths) @@ -48,7 +59,6 @@ # Create a forwarding module .pri file MODULE_FWD_PRI_CONT = \ - "QT_MODULE_BASE = $$MODULE_BASE_DIR" \ "QT_MODULE_BIN_BASE = $$MODULE_BASE_OUTDIR/bin" \ "QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_OUTDIR/include" \ "QT_MODULE_IMPORT_BASE = $$MODULE_BASE_OUTDIR/imports" \ @@ -72,6 +82,7 @@ for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \ name depends private_depends module_config CONFIG DEFINES sources \ includes private_includes bins libs libexecs plugins imports qml \ + rpath_link rpath_link_private \ )):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient) cache(QT_CONFIG, transient) diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf index 6acff23460..10d3fe3c0b 100644 --- a/mkspecs/features/qt_module_headers.prf +++ b/mkspecs/features/qt_module_headers.prf @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + load(qt_build_paths) !build_pass { diff --git a/mkspecs/features/qt_parts.prf b/mkspecs/features/qt_parts.prf index 75fa2966bc..12ba312bcd 100644 --- a/mkspecs/features/qt_parts.prf +++ b/mkspecs/features/qt_parts.prf @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + load(qt_build_config) TEMPLATE = subdirs diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf index b84fa47dd1..4861576eba 100644 --- a/mkspecs/features/qt_plugin.prf +++ b/mkspecs/features/qt_plugin.prf @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + load(qt_build_paths) isEmpty(PLUGIN_TYPE): error("PLUGIN_TYPE (plugins/ subdirectory) needs to be defined.") @@ -20,14 +31,18 @@ contains(QT_CONFIG, c++11):CONFIG += c++11 contains(QT_CONFIG, static):CONFIG += static else:CONFIG += shared -!build_pass:static { - isEmpty(MODULE): MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0) +static { + isEmpty(MODULE): MODULE = $$basename(TARGET) MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_plugin_$${MODULE}.pri - MODULE_PRI_CONT = \ - "QT_PLUGIN.$${MODULE}.TYPE = $$PLUGIN_TYPE" - write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.") + !build_pass { + MODULE_PRI_CONT = \ + "QT_PLUGIN.$${MODULE}.TYPE = $$PLUGIN_TYPE" \ + "QT_PLUGIN.$${MODULE}.CLASS_NAME = $$PLUGIN_CLASS_NAME" + + write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.") + } pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules pritarget.files = $$MODULE_PRI diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf index 3510582c8e..16db6c7972 100644 --- a/mkspecs/features/qt_tool.prf +++ b/mkspecs/features/qt_tool.prf @@ -1,9 +1,20 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + TEMPLATE = app load(qt_build_paths) DESTDIR = $$MODULE_BASE_OUTDIR/bin -CONFIG += qt warn_on console +CONFIG += console isEmpty(QMAKE_INFO_PLIST): CONFIG -= app_bundle host_build { diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf index 455dd3b985..c60faf22c0 100644 --- a/mkspecs/features/resolve_target.prf +++ b/mkspecs/features/resolve_target.prf @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + QMAKE_RESOLVED_TARGET = $$absolute_path($$DESTDIR, $$OUT_PWD)/ win32 { diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf index dfded30e28..ed44d9c308 100644 --- a/mkspecs/features/resources.prf +++ b/mkspecs/features/resources.prf @@ -1,7 +1,6 @@ qtPrepareTool(QMAKE_RCC, rcc) isEmpty(RCC_DIR):RCC_DIR = . -isEmpty(QMAKE_RESOURCE_PREFIX):QMAKE_RESOURCE_PREFIX = /tmp/ isEmpty(QMAKE_MOD_RCC):QMAKE_MOD_RCC = qrc resource_combine { diff --git a/mkspecs/features/simd.prf b/mkspecs/features/simd.prf index 6d729a66a7..b430e59ff0 100644 --- a/mkspecs/features/simd.prf +++ b/mkspecs/features/simd.prf @@ -1,3 +1,14 @@ +# +# W A R N I N G +# ------------- +# +# This file is not part of the Qt API. It exists purely as an +# implementation detail. It may change from version to version +# without notice, or even be removed. +# +# We mean it. +# + # Get the SIMD flags load(qt_build_config) diff --git a/mkspecs/features/spec_post.prf b/mkspecs/features/spec_post.prf index a58690e8a6..46a512bf17 100644 --- a/mkspecs/features/spec_post.prf +++ b/mkspecs/features/spec_post.prf @@ -1,3 +1,9 @@ +# This file is loaded by qmake right after loading the qmakespec. +# Afterwards, the project's .qmake.conf and .qmake.cache are loaded +# (if present). +# Note that up to this point, nothing specific to a particular SUBDIRS +# project or build pass can be done. + isEmpty(MAKEFILE_GENERATOR):error("Qmake spec does not set MAKEFILE_GENERATOR.") isEmpty(QMAKE_PLATFORM) { isEmpty(TARGET_PLATFORM) { diff --git a/mkspecs/features/spec_pre.prf b/mkspecs/features/spec_pre.prf index 14e3ac90de..844fa35579 100644 --- a/mkspecs/features/spec_pre.prf +++ b/mkspecs/features/spec_pre.prf @@ -1,3 +1,7 @@ +# This file is loaded by qmake right before loading the qmakespec. +# At this point, the built-in variables have been set up and the project's +# .qmake.super was read (if present). + QMAKE_DIR_SEP = $$DIR_SEPARATOR QMAKE_DIRLIST_SEP = $$DIRLIST_SEPARATOR diff --git a/mkspecs/features/testcase_targets.prf b/mkspecs/features/testcase_targets.prf new file mode 100644 index 0000000000..e9b107735a --- /dev/null +++ b/mkspecs/features/testcase_targets.prf @@ -0,0 +1,9 @@ + +# Let every project have a standard GNU `check' target +!contains(QMAKE_EXTRA_TARGETS, check) { + contains(TEMPLATE, subdirs): \ + prepareRecursiveTarget(check) + else: \ + check.depends = first # `make check' implies build + QMAKE_EXTRA_TARGETS += check +} diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf index a98c62676c..36ec185f7b 100644 --- a/mkspecs/features/uic.prf +++ b/mkspecs/features/uic.prf @@ -1,33 +1,19 @@ qtPrepareTool(QMAKE_UIC, uic) isEmpty(UI_DIR):UI_DIR = . -isEmpty(UI_SOURCES_DIR):UI_SOURCES_DIR = $$UI_DIR -isEmpty(UI_HEADERS_DIR):UI_HEADERS_DIR = $$UI_DIR isEmpty(QMAKE_MOD_UIC):QMAKE_MOD_UIC = ui_ -# Allow FORMS3 to contain old UIC3 forms, while FORMS contains new -# UIC files in the same project. However, if CONFIG+=uic3 and no -# FORMS3 is defined, FORMS may only contain old UIC3 files. +uic.commands = $$QMAKE_UIC ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} +uic.depend_command = "$$QMAKE_UIC" -d "${QMAKE_FILE_IN}" +uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)} +uic.input = FORMS +uic.variable_out = GENERATED_FILES +uic.CONFIG += no_link target_predeps +uic.name = UIC ${QMAKE_FILE_IN} +silent:uic.commands = @echo uic ${QMAKE_FILE_IN} && $$uic.commands +QMAKE_EXTRA_COMPILERS += uic +INCREDIBUILD_XGE += uic -!uic3|!isEmpty(FORMS3) { - # If we have CONFIG+=uic3 and no FORMS3, then don't do this step, - # as UIC3 files don't need a ui_<formname>.h file - - uic.commands = $$QMAKE_UIC ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} - uic.depend_command = "$$QMAKE_UIC" -d "${QMAKE_FILE_IN}" - uic.output = $$UI_HEADERS_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)} - uic.input = FORMS - uic.variable_out = GENERATED_FILES - uic.CONFIG += no_link target_predeps - uic.name = UIC ${QMAKE_FILE_IN} - silent:uic.commands = @echo uic ${QMAKE_FILE_IN} && $$uic.commands - QMAKE_EXTRA_COMPILERS += uic - INCREDIBUILD_XGE += uic -} - -!isEmpty(FORMS)|!isEmpty(FORMS3) { - ui_dir_short = $$UI_HEADERS_DIR - contains(QMAKE_HOST.os,Windows):ui_dir_short ~= s,^.:,/, - contains(ui_dir_short, ^[/\\\\].*):INCLUDEPATH += $$UI_HEADERS_DIR - else:INCLUDEPATH += $$OUT_PWD/$$UI_HEADERS_DIR +!isEmpty(FORMS) { + INCLUDEPATH += $$absolute_path($$UI_DIR, $$OUT_PWD) } diff --git a/mkspecs/features/win32/thread.prf b/mkspecs/features/win32/thread.prf deleted file mode 100644 index fc832a0990..0000000000 --- a/mkspecs/features/win32/thread.prf +++ /dev/null @@ -1,22 +0,0 @@ -CONFIG -= thread_off - -# #### These need to go -debug { - contains(DEFINES, QT_DLL) { - QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT_DLLDBG - QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT_DLLDBG - } else { - QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT_DBG - QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT_DBG - } -} else { - contains(DEFINES, QT_DLL) { - QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT_DLL - QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT_DLL - } else { - QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT - QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT - } -} - -QMAKE_LIBS += $$QMAKE_LIBS_RTMT diff --git a/mkspecs/features/win32/thread_off.prf b/mkspecs/features/win32/thread_off.prf deleted file mode 100644 index 436a2c8166..0000000000 --- a/mkspecs/features/win32/thread_off.prf +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG -= thread -QMAKE_LIBS += $$QMAKE_LIBS_RT |