summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/msvc_vcxproj.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-10-05 15:20:31 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-10-05 18:58:35 (GMT)
commit07256884f745e93d98687b213d037baf4be538a1 (patch)
treeb7db0ea54b72b1af0fbab804b282c57a77836ea0 /qmake/generators/win32/msvc_vcxproj.cpp
parentcace0a51e21ff8275b887025b562fc79bec9f32f (diff)
downloadQt-07256884f745e93d98687b213d037baf4be538a1.zip
Qt-07256884f745e93d98687b213d037baf4be538a1.tar.gz
Qt-07256884f745e93d98687b213d037baf4be538a1.tar.bz2
make custom command handling in vc(x)proj files sane
instead of glueing the commands with "&&" and having a monster hack (\r\h) for the case where they cannot be and-ed, glue them with newlines and error checks. this ensures that we a) never have excessively long lines, b) don't need the monster hack and c) commands always have proper error checks, just like in makefiles. Reviewed-by: mariusSO
Diffstat (limited to 'qmake/generators/win32/msvc_vcxproj.cpp')
-rw-r--r--qmake/generators/win32/msvc_vcxproj.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/qmake/generators/win32/msvc_vcxproj.cpp b/qmake/generators/win32/msvc_vcxproj.cpp
index 271d9ae..396d2bf 100644
--- a/qmake/generators/win32/msvc_vcxproj.cpp
+++ b/qmake/generators/win32/msvc_vcxproj.cpp
@@ -380,9 +380,9 @@ void VcxprojGenerator::initPostBuildEventTools()
{
VCXConfiguration &conf = vcxProject.Configuration;
if(!project->values("QMAKE_POST_LINK").isEmpty()) {
- QString cmdline = var("QMAKE_POST_LINK");
+ QStringList cmdline = VCToolBase::fixCommandLine(var("QMAKE_POST_LINK"));
conf.postBuild.CommandLine = cmdline;
- conf.postBuild.Description = cmdline;
+ conf.postBuild.Description = cmdline.join(QLatin1String("\r\n"));
conf.postBuild.UseInBuild = _True;
}
@@ -390,14 +390,12 @@ void VcxprojGenerator::initPostBuildEventTools()
bool useSignature = !signature.isEmpty() && !project->isActiveConfig("staticlib") &&
!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH");
if(useSignature) {
- conf.postBuild.CommandLine.prepend(QLatin1String("signtool sign /F ") + signature + " \"$(TargetPath)\"\n" +
- (!conf.postBuild.CommandLine.isEmpty() ? " && " : ""));
+ conf.postBuild.CommandLine.prepend(
+ QLatin1String("signtool sign /F ") + signature + QLatin1String(" \"$(TargetPath)\""));
conf.postBuild.UseInBuild = _True;
}
if(!project->values("MSVCPROJ_COPY_DLL").isEmpty()) {
- if(!conf.postBuild.CommandLine.isEmpty())
- conf.postBuild.CommandLine += " && ";
conf.postBuild.Description += var("MSVCPROJ_COPY_DLL_DESC");
conf.postBuild.CommandLine += var("MSVCPROJ_COPY_DLL");
conf.postBuild.UseInBuild = _True;
@@ -530,9 +528,9 @@ void VcxprojGenerator::initPreLinkEventTools()
{
VCXConfiguration &conf = vcxProject.Configuration;
if(!project->values("QMAKE_PRE_LINK").isEmpty()) {
- QString cmdline = var("QMAKE_PRE_LINK");
- conf.preLink.Description = cmdline;
+ QStringList cmdline = VCToolBase::fixCommandLine(var("QMAKE_PRE_LINK"));
conf.preLink.CommandLine = cmdline;
+ conf.preLink.Description = cmdline.join(QLatin1String("\r\n"));
conf.preLink.UseInBuild = _True;
}
}