diff options
author | Andreas Holzammer <andreas.holzammer@kdab.com> | 2016-03-21 08:42:11 +0100 |
---|---|---|
committer | Andreas Holzammer <andreas.holzammer@kdab.com> | 2016-03-22 14:10:12 +0000 |
commit | 8fd96d78f0597fddda0d04fef5fc8c7acb3b468e (patch) | |
tree | 482576cbc92cd318f5b88fa5fd7bc345ddf487ed /qmake | |
parent | f8d790f086c2531f5437023a8188b4b4f07f6c31 (diff) |
qmake/wince: Deploy QPA plugin as well in Visual Studio
Change-Id: Ia936290ddb61a85be18d903b64d4b11c709b0732
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 73c9f397e5..6206b2c8f1 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1283,6 +1283,7 @@ void VcprojGenerator::initDeploymentTool() !(conf.WinRT && project->first("MSVC_VER").toQString() == "14.0")) { // FIXME: This code should actually resolve the libraries from all Qt modules. ProStringList arg = project->values("QMAKE_LIBS") + project->values("QMAKE_LIBS_PRIVATE"); + bool qpaPluginDeployed = false; for (ProStringList::ConstIterator it = arg.constBegin(); it != arg.constEnd(); ++it) { QString dllName = (*it).toQString(); dllName.replace(QLatin1Char('\\'), QLatin1Char('/')); @@ -1315,6 +1316,32 @@ void VcprojGenerator::initDeploymentTool() + "|" + QDir::toNativeSeparators(info.absolutePath()) + "|" + targetPath + "|0;"; + if (!qpaPluginDeployed) { + QChar debugInfixChar; + bool foundGuid = false; + if (foundGuid = dllName.contains(QLatin1String("Guid"))) + debugInfixChar = QLatin1Char('d'); + + if (foundGuid || dllName.contains(QLatin1String("Gui"))) { + QFileInfo info2; + foreach (const ProString &dllPath, dllPaths) { + QString absoluteDllFilePath = dllPath.toQString(); + if (!absoluteDllFilePath.endsWith(QLatin1Char('/'))) + absoluteDllFilePath += QLatin1Char('/'); + absoluteDllFilePath += QLatin1String("../plugins/platforms/qwindows") + debugInfixChar + QLatin1String(".dll"); + info2 = QFileInfo(absoluteDllFilePath); + if (info2.exists()) + break; + } + if (info2.exists()) { + conf.deployment.AdditionalFiles += QLatin1String("qwindows") + debugInfixChar + QLatin1String(".dll") + + QLatin1Char('|') + QDir::toNativeSeparators(info2.absolutePath()) + + QLatin1Char('|') + targetPath + QLatin1String("\\platforms") + + QLatin1String("|0;"); + qpaPluginDeployed = true; + } + } + } } } } |