summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp24
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp19
-rw-r--r--qmake/generators/win32/msvc_vcxproj.cpp30
3 files changed, 32 insertions, 41 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_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 8c9bba8..35e4896 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -917,14 +917,12 @@ void VcprojGenerator::initCompilerTool()
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS"));
if(project->isActiveConfig("debug")){
// Debug version
- conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_DEBUG"));
if((projectTarget == Application) || (projectTarget == StaticLib))
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_MT_DBG"));
else
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_MT_DLLDBG"));
} else {
// Release version
- conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_RELEASE"));
conf.compiler.PreprocessorDefinitions += "QT_NO_DEBUG";
conf.compiler.PreprocessorDefinitions += "NDEBUG";
if((projectTarget == Application) || (projectTarget == StaticLib))
@@ -934,10 +932,6 @@ void VcprojGenerator::initCompilerTool()
}
// Common for both release and debug
- if(project->isActiveConfig("warn_off"))
- conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_WARN_OFF"));
- else if(project->isActiveConfig("warn_on"))
- conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_WARN_ON"));
if(project->isActiveConfig("windows"))
conf.compiler.PreprocessorDefinitions += project->values("MSVCPROJ_WINCONDEF");
@@ -1000,22 +994,9 @@ void VcprojGenerator::initLinkerTool()
conf.linker.OutputFile += project->first("MSVCPROJ_TARGET");
- if(project->isActiveConfig("debug")){
- conf.linker.parseOptions(project->values("QMAKE_LFLAGS_DEBUG"));
- } else {
- conf.linker.parseOptions(project->values("QMAKE_LFLAGS_RELEASE"));
- }
-
if(project->isActiveConfig("dll")){
conf.linker.parseOptions(project->values("QMAKE_LFLAGS_QT_DLL"));
}
-
- if(project->isActiveConfig("console")){
- conf.linker.parseOptions(project->values("QMAKE_LFLAGS_CONSOLE"));
- } else {
- conf.linker.parseOptions(project->values("QMAKE_LFLAGS_WINDOWS"));
- }
-
}
void VcprojGenerator::initResourceTool()
diff --git a/qmake/generators/win32/msvc_vcxproj.cpp b/qmake/generators/win32/msvc_vcxproj.cpp
index 6a91c6b..da93fe3 100644
--- a/qmake/generators/win32/msvc_vcxproj.cpp
+++ b/qmake/generators/win32/msvc_vcxproj.cpp
@@ -294,14 +294,12 @@ void VcxprojGenerator::initCompilerTool()
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS"));
if(project->isActiveConfig("debug")){
// Debug version
- conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_DEBUG"));
if((projectTarget == Application) || (projectTarget == StaticLib))
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_MT_DBG"));
else
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_MT_DLLDBG"));
} else {
// Release version
- conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_RELEASE"));
conf.compiler.PreprocessorDefinitions += "QT_NO_DEBUG";
conf.compiler.PreprocessorDefinitions += "NDEBUG";
if((projectTarget == Application) || (projectTarget == StaticLib))
@@ -311,10 +309,6 @@ void VcxprojGenerator::initCompilerTool()
}
// Common for both release and debug
- if(project->isActiveConfig("warn_off"))
- conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_WARN_OFF"));
- else if(project->isActiveConfig("warn_on"))
- conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_WARN_ON"));
if(project->isActiveConfig("windows"))
conf.compiler.PreprocessorDefinitions += project->values("MSVCPROJ_WINCONDEF");
@@ -363,22 +357,9 @@ void VcxprojGenerator::initLinkerTool()
conf.linker.OutputFile += project->first("MSVCPROJ_TARGET");
- if(project->isActiveConfig("debug")){
- conf.linker.parseOptions(project->values("QMAKE_LFLAGS_DEBUG"));
- } else {
- conf.linker.parseOptions(project->values("QMAKE_LFLAGS_RELEASE"));
- }
-
if(project->isActiveConfig("dll")){
conf.linker.parseOptions(project->values("QMAKE_LFLAGS_QT_DLL"));
}
-
- if(project->isActiveConfig("console")){
- conf.linker.parseOptions(project->values("QMAKE_LFLAGS_CONSOLE"));
- } else {
- conf.linker.parseOptions(project->values("QMAKE_LFLAGS_WINDOWS"));
- }
-
}
void VcxprojGenerator::initResourceTool()
@@ -403,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;
}
}
@@ -549,6 +534,7 @@ void VcxprojGenerator::initPreLinkEventTools()
QString cmdline = var("QMAKE_PRE_LINK");
conf.preLink.Description = cmdline;
conf.preLink.CommandLine = cmdline;
+ conf.preLink.UseInBuild = _True;
}
}