summaryrefslogtreecommitdiff
path: root/qmake/generators/win32
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2010-09-20 17:48:45 +0200
committerJoerg Bornemann <joerg.bornemann@nokia.com>2010-09-21 10:34:23 +0200
commit9e59a5256eb6275483bc3777878a62c2069a0927 (patch)
tree1a58dc81fdd3c6031bec93e9edaf5cd56197166a /qmake/generators/win32
parent9b1b89323f2de37a5871848fbf955409a746913f (diff)
downloadqt4-tools-9e59a5256eb6275483bc3777878a62c2069a0927.tar.gz
qmake: introduction of QMAKE_PROJECT_NAME
With this variable one can set the project name for IDE project files. Currently only used for Visual Studio Task-number: QTBUG-3206 Reviewed-by: ossi
Diffstat (limited to 'qmake/generators/win32')
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp6
-rw-r--r--qmake/generators/win32/winmakefile.cpp5
2 files changed, 8 insertions, 3 deletions
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index f32ba7e4fa..3c42f145fb 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -280,7 +280,7 @@ bool VcprojGenerator::writeProjectMakefile()
mergedProjects.at(0)->vcProject.Name ==
mergedProjects.at(1)->vcProject.Name)
mergedProjects.at(0)->writePrlFile();
- mergedProject.Name = unescapeFilePath(project->first("QMAKE_ORIG_TARGET"));
+ mergedProject.Name = project->first("QMAKE_PROJECT_NAME");
mergedProject.Version = mergedProjects.at(0)->vcProject.Version;
mergedProject.ProjectGUID = project->isEmpty("QMAKE_UUID") ? getProjectUUID().toString().toUpper() : project->first("QMAKE_UUID");
mergedProject.Keyword = project->first("VCPROJ_KEYWORD");
@@ -468,8 +468,8 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
}
}
- // We assume project filename is [QMAKE_ORIG_TARGET].vcproj
- QString vcproj = unescapeFilePath(tmp_vcproj.project->first("QMAKE_ORIG_TARGET") + project->first("VCPROJ_EXTENSION"));
+ // We assume project filename is [QMAKE_PROJECT_NAME].vcproj
+ QString vcproj = unescapeFilePath(tmp_vcproj.project->first("QMAKE_PROJECT_NAME") + project->first("VCPROJ_EXTENSION"));
QString vcprojDir = qmake_getpwd();
// If file doesn't exsist, then maybe the users configuration
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index ecb20c70f9..58f21cb90d 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -290,6 +290,11 @@ void Win32MakefileGenerator::processVars()
}
project->values("QMAKE_ORIG_TARGET") = project->values("TARGET");
+ if (project->isEmpty("QMAKE_PROJECT_NAME"))
+ project->values("QMAKE_PROJECT_NAME") = project->values("QMAKE_ORIG_TARGET");
+ else if (project->first("TEMPLATE").startsWith("vc"))
+ project->values("MAKEFILE") = project->values("QMAKE_PROJECT_NAME");
+
if (!project->values("QMAKE_INCDIR").isEmpty())
project->values("INCLUDEPATH") += project->values("QMAKE_INCDIR");