summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Petersson <martin.petersson@nokia.com>2010-04-30 13:34:26 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-04-30 13:34:26 (GMT)
commit736f0a0dd113e54a4d49a1e1e992dc42070866b5 (patch)
tree80368a9de847bceb7196acf3d2d7719e63693736
parent37a36bcc768fb8ec1cdcca03d4d4cfba6fcc8bb9 (diff)
downloadQt-736f0a0dd113e54a4d49a1e1e992dc42070866b5.zip
Qt-736f0a0dd113e54a4d49a1e1e992dc42070866b5.tar.gz
Qt-736f0a0dd113e54a4d49a1e1e992dc42070866b5.tar.bz2
Fix project file generation for MSVC 2010
Adding the post-build step to copy the dll into bin Reviewed-By: Thierry
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp24
-rw-r--r--qmake/generators/win32/msvc_vcxproj.cpp11
2 files changed, 32 insertions, 3 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index d011c5c..522d517 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -2837,6 +2837,18 @@ XmlOutput &operator<<(XmlOutput &xml, const VCXProjectSingleConfig &tool)
// ResourceCompiler
xml << tool.Configuration.resource;
+ // Post build event
+ if ( tool.Configuration.postBuild.UseInBuild != unset )
+ xml << tool.Configuration.postBuild;
+
+ // Pre build event
+ if ( tool.Configuration.preBuild.UseInBuild != unset )
+ xml << tool.Configuration.preBuild;
+
+ // Pre link event
+ if ( tool.Configuration.preLink.UseInBuild != unset )
+ xml << tool.Configuration.preLink;
+
xml << closetag();
QFile filterFile;
@@ -3266,6 +3278,18 @@ XmlOutput &operator<<(XmlOutput &xml, VCXProject &tool)
// ResourceCompiler
xml << tool.SingleProjects.at(i).Configuration.resource;
+ // Post build event
+ if ( tool.SingleProjects.at(i).Configuration.postBuild.UseInBuild != unset )
+ xml << tool.SingleProjects.at(i).Configuration.postBuild;
+
+ // Pre build event
+ if ( tool.SingleProjects.at(i).Configuration.preBuild.UseInBuild != unset )
+ xml << tool.SingleProjects.at(i).Configuration.preBuild;
+
+ // Pre link event
+ if ( tool.SingleProjects.at(i).Configuration.preLink.UseInBuild != unset )
+ xml << tool.SingleProjects.at(i).Configuration.preLink;
+
xml << closetag();
}
diff --git a/qmake/generators/win32/msvc_vcxproj.cpp b/qmake/generators/win32/msvc_vcxproj.cpp
index 76aa2a9..da93fe3 100644
--- a/qmake/generators/win32/msvc_vcxproj.cpp
+++ b/qmake/generators/win32/msvc_vcxproj.cpp
@@ -384,20 +384,24 @@ void VcxprojGenerator::initPostBuildEventTools()
QString cmdline = var("QMAKE_POST_LINK");
conf.postBuild.CommandLine = cmdline;
conf.postBuild.Description = cmdline;
+ conf.postBuild.UseInBuild = _True;
}
QString signature = !project->isEmpty("SIGNATURE_FILE") ? var("SIGNATURE_FILE") : var("DEFAULT_SIGNATURE");
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() ? " && " : ""));
+ if(useSignature) {
+ conf.postBuild.CommandLine.prepend(QLatin1String("signtool sign /F ") + signature + " \"$(TargetPath)\"\n" +
+ (!conf.postBuild.CommandLine.isEmpty() ? " && " : ""));
+ 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,6 +534,7 @@ void VcxprojGenerator::initPreLinkEventTools()
QString cmdline = var("QMAKE_PRE_LINK");
conf.preLink.Description = cmdline;
conf.preLink.CommandLine = cmdline;
+ conf.preLink.UseInBuild = _True;
}
}