summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2011-02-14 16:00:02 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2011-03-15 14:56:05 (GMT)
commitfef94ecbfb1c5b576247f2e203d0dd8c2c8f2ae1 (patch)
treeb467e9fc6583e8c070e24b73c9a4346dfb6e0ee8 /qmake
parenta60bd37c08300201bb2a259f390b92e35808843e (diff)
downloadQt-fef94ecbfb1c5b576247f2e203d0dd8c2c8f2ae1.zip
Qt-fef94ecbfb1c5b576247f2e203d0dd8c2c8f2ae1.tar.gz
Qt-fef94ecbfb1c5b576247f2e203d0dd8c2c8f2ae1.tar.bz2
qmake vc(x)proj generator: set the output directory
The configuration property OutDir was always set to ".\\". We're now referencing "$(OutDir)" instead of building the path every time from DESTDIR. Also, VCConfiguration::PrimaryOutput was always empty for VS < 2010 and is now unused. The variable MSVCPROJ_LIBOPTIONS was removed. Task-number: QTBUG-16490 Reviewed-by: Marius Storm-Olsen
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp45
1 files changed, 8 insertions, 37 deletions
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 0df33d0..b2e5959 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -878,22 +878,16 @@ void VcprojGenerator::initConfiguration()
break;
}
+ conf.OutputDirectory = project->first("DESTDIR");
+ if (conf.OutputDirectory.isEmpty())
+ conf.OutputDirectory = ".\\";
+ if (!conf.OutputDirectory.endsWith("\\"))
+ conf.OutputDirectory += '\\';
if (conf.CompilerVersion >= NET2010) {
- conf.OutputDirectory = project->first("DESTDIR");
-
- if(conf.OutputDirectory.isEmpty())
- conf.OutputDirectory = ".\\";
-
- if(!conf.OutputDirectory.endsWith("\\"))
- conf.OutputDirectory += '\\';
-
// The target name could have been changed.
conf.PrimaryOutput = project->first("TARGET");
if ( !conf.PrimaryOutput.isEmpty() && !project->first("TARGET_VERSION_EXT").isEmpty() && project->isActiveConfig("shared"))
conf.PrimaryOutput.append(project->first("TARGET_VERSION_EXT"));
- } else {
- conf.PrimaryOutput = project->first("PrimaryOutput");
- conf.OutputDirectory = ".";
}
conf.Name = project->values("BUILD_NAME").join(" ");
@@ -982,13 +976,7 @@ void VcprojGenerator::initCompilerTool()
void VcprojGenerator::initLibrarianTool()
{
VCConfiguration &conf = vcProject.Configuration;
- conf.librarian.OutputFile = project->first("DESTDIR");
- if(conf.librarian.OutputFile.isEmpty())
- conf.librarian.OutputFile = ".\\";
-
- if(!conf.librarian.OutputFile.endsWith("\\"))
- conf.librarian.OutputFile += '\\';
-
+ conf.librarian.OutputFile = "$(OutDir)\\";
conf.librarian.OutputFile += project->first("MSVCPROJ_TARGET");
conf.librarian.AdditionalOptions += project->values("QMAKE_LIBFLAGS");
}
@@ -1018,24 +1006,7 @@ void VcprojGenerator::initLinkerTool()
}
}
- switch (projectTarget) {
- case Application:
- conf.linker.OutputFile = project->first("DESTDIR");
- break;
- case SharedLib:
- conf.linker.parseOptions(project->values("MSVCPROJ_LIBOPTIONS"));
- conf.linker.OutputFile = project->first("DESTDIR");
- break;
- case StaticLib: //unhandled - added to remove warnings..
- break;
- }
-
- if(conf.linker.OutputFile.isEmpty())
- conf.linker.OutputFile = ".\\";
-
- if(!conf.linker.OutputFile.endsWith("\\"))
- conf.linker.OutputFile += '\\';
-
+ conf.linker.OutputFile = "$(OutDir)\\";
conf.linker.OutputFile += project->first("MSVCPROJ_TARGET");
if(project->isActiveConfig("dll")){
@@ -1054,7 +1025,7 @@ void VcprojGenerator::initResourceTool()
if(project->isActiveConfig("debug"))
conf.resource.PreprocessorDefinitions += "_DEBUG";
if(project->isActiveConfig("staticlib"))
- conf.resource.ResourceOutputFileName = project->first("DESTDIR") + "/$(InputName).res";
+ conf.resource.ResourceOutputFileName = "$(OutDir)\\$(InputName).res";
}
void VcprojGenerator::initIDLTool()