diff options
-rw-r--r-- | mkspecs/features/qt_functions.prf | 20 | ||||
-rw-r--r-- | mkspecs/features/qt_plugin.prf | 10 |
2 files changed, 18 insertions, 12 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index d41fe3b4d5..9a4d80e80f 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -253,11 +253,13 @@ defineTest(qtAddTargetEnv) { deps = $$replace($$2, -private$, _private) deps = $$resolve_depends(deps, "QT.", ".depends" ".private_depends" ".run_depends") !isEmpty(deps) { + ptypes = for(dep, deps) { isEmpty(3): \ deppath += $$shell_path($$eval(QT.$${dep}.libs)) else: \ deppath += $$system_path($$eval(QT.$${dep}.libs)) + ptypes += $$eval(QT.$${dep}.plugin_types) } equals(QMAKE_HOST.os, Windows) { deppath.name = PATH @@ -277,14 +279,16 @@ defineTest(qtAddTargetEnv) { deppath.CONFIG = prepend pluginpath.value = - for(qmod, QMAKEMODULES) { - qmod = $$section(qmod, /, 0, -3)/plugins - exists($$qmod) { - isEmpty(3): \ - pluginpath.value += $$shell_path($$qmod) - else: \ - pluginpath.value += $$system_path($$qmod) - } + ppaths = $$[QT_INSTALL_PLUGINS/get] + for(qplug, QT_PLUGINS): \ + contains(ptypes, QT_PLUGIN.$${qplug}.TYPE): \ + ppaths += $$eval(QT_PLUGIN.$${qplug}.PATH) + ppaths = $$unique(ppaths) + for(qplug, ppaths) { + isEmpty(3): \ + pluginpath.value += $$shell_path($$qplug) + else: \ + pluginpath.value += $$system_path($$qplug) } pluginpath.name = QT_PLUGIN_PATH diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf index b012278bde..8a70ce041a 100644 --- a/mkspecs/features/qt_plugin.prf +++ b/mkspecs/features/qt_plugin.prf @@ -24,7 +24,7 @@ tool_plugin { contains(QT_CONFIG, build_all):CONFIG += build_all } -CONFIG(static, static|shared) { +CONFIG(static, static|shared)|prefix_build { isEmpty(MODULE): MODULE = $$basename(TARGET) mod_work_pfx = $$MODULE_QMAKE_OUTDIR/mkspecs/modules @@ -66,9 +66,11 @@ CONFIG(static, static|shared) { cache(QT_PLUGINS, transient) } - pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules - pritarget.files = $$MODULE_PRI - INSTALLS += pritarget + CONFIG(static, static|shared) { + pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules + pritarget.files = $$MODULE_PRI + INSTALLS += pritarget + } } target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE |