diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-03-21 09:02:57 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-03-21 09:02:57 +0100 |
commit | 6cb8121a44ee0f94f2c9fcb075d1d3c802d8c5c7 (patch) | |
tree | 25822898b71068f820d25a9e8372dfb348190ec1 /mkspecs/features | |
parent | 96740193e1e0f0608f67660811a44b696924ad4c (diff) | |
parent | 2e02de165115c9d67ac343ff0960ed80f9c09bc8 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/widgets/styles/qgtkstyle_p.cpp
tests/auto/corelib/io/qtextstream/test/test.pro
tests/auto/corelib/plugin/plugin.pro
Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/qt.prf | 15 | ||||
-rw-r--r-- | mkspecs/features/qt_build_config.prf | 7 | ||||
-rw-r--r-- | mkspecs/features/qt_build_extra.prf | 40 | ||||
-rw-r--r-- | mkspecs/features/qt_functions.prf | 13 |
4 files changed, 61 insertions, 14 deletions
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 4b40451c96..e54841a678 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -160,21 +160,8 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.") contains(qt_module_deps, core) { relative_qt_rpath:!isEmpty(QMAKE_REL_RPATH_BASE):contains(INSTALLS, target):\ isEmpty(target.files):isEmpty(target.commands):isEmpty(target.extra) { - mac { - if(equals(TEMPLATE, app):app_bundle)|\ - if(equals(TEMPLATE, lib):plugin:plugin_bundle) { - ios: binpath = $$target.path/$${TARGET}.app - else: binpath = $$target.path/$${TARGET}.app/Contents/MacOS - } else: equals(TEMPLATE, lib):!plugin:lib_bundle { - binpath = $$target.path/$${TARGET}.framework/Versions/Current - } else { - binpath = $$target.path - } - } else { - binpath = $$target.path - } # NOT the /dev property, as INSTALLS use host paths - QMAKE_RPATHDIR += $$relative_path($$[QT_INSTALL_LIBS], $$binpath) + QMAKE_RPATHDIR += $$relative_path($$[QT_INSTALL_LIBS], $$qtRelativeRPathBase()) } else { QMAKE_RPATHDIR += $$[QT_INSTALL_LIBS/dev] } diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index 518fd93f04..2d437e7f91 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -52,6 +52,9 @@ QMAKE_DIR_REPLACE_SANE = PRECOMPILED_DIR OBJECTS_DIR MOC_DIR RCC_DIR UI_DIR unset(modpath) } +# Apply extra compiler flags passed via configure last. +CONFIG = qt_build_extra $$CONFIG + # Don't actually try to install anything in non-prefix builds. # This is much easier and safer than making every single INSTALLS # assignment conditional. @@ -72,6 +75,10 @@ CONFIG += \ # However, testcases should be still built with exceptions. exceptions_off testcase_exceptions +# Under Windows, this is neither necessary (transitive deps are automatically +# resolved), nor functional (.res files end up in .prl files and break things). +unix: CONFIG += explicitlib + defineTest(qtBuildPart) { bp = $$eval($$upper($$section(_QMAKE_CONF_, /, -2, -2))_BUILD_PARTS) diff --git a/mkspecs/features/qt_build_extra.prf b/mkspecs/features/qt_build_extra.prf new file mode 100644 index 0000000000..378f5bbd7c --- /dev/null +++ b/mkspecs/features/qt_build_extra.prf @@ -0,0 +1,40 @@ +# +# 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, subdirs): return() + +# It's likely that these extra flags will be wrong for host builds, +# and the bootstrapped tools usually don't need them anyway. +host_build:force_bootstrap: return() + +# The headersclean check needs defines and includes even for +# header-only modules. +DEFINES += $$EXTRA_DEFINES +INCLUDEPATH += $$EXTRA_INCLUDEPATH + +# The other flags are relevant only for actual libraries. +equals(TEMPLATE, aux): return() + +LIBS += $$EXTRA_LIBS + +# Static libs need no rpaths +static: return() + +for (rp, EXTRA_RPATHS) { + absrp = $$absolute_path($$rp, $$[QT_INSTALL_LIBS]) + !isEqual(absrp, $$rp) { + isEmpty(QMAKE_REL_RPATH_BASE)|!contains(INSTALLS, target): \ + rp = $$absrp + else: \ + rp = $$relative_path($$absrp, $$qtRelativeRPathBase()) + } + QMAKE_RPATHDIR += $$rp +} diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 2756f90b01..9c3414c6fc 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -33,6 +33,19 @@ defineReplace(qt5LibraryTarget) { return($$LIBRARY_NAME) } +defineReplace(qtRelativeRPathBase) { + darwin { + if(equals(TEMPLATE, app):app_bundle)|\ + if(equals(TEMPLATE, lib):plugin:plugin_bundle) { + ios: return($$target.path/$${TARGET}.app) + return($$target.path/$${TARGET}.app/Contents/MacOS) + } + equals(TEMPLATE, lib):!plugin:lib_bundle: \ + return($$target.path/$${TARGET}.framework/Versions/Current) + } + return($$target.path) +} + defineTest(qtAddLibrary) { warning("qtAddLibrary() is deprecated. Use QT+= instead.") |