summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp21
-rw-r--r--qmake/generators/win32/msvc_vcproj.h2
2 files changed, 21 insertions, 2 deletions
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 0d78766606..1fa117afda 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -421,6 +421,24 @@ bool VcprojGenerator::isStandardSuffix(const QString &suffix) const
return false;
}
+ProString VcprojGenerator::firstInputFileName(const ProString &extraCompilerName) const
+{
+ foreach (const ProString &var, project->values(ProKey(extraCompilerName + ".input"))) {
+ const ProStringList &files = project->values(var.toKey());
+ if (!files.isEmpty())
+ return files.first();
+ }
+ return ProString();
+}
+
+QString VcprojGenerator::firstExpandedOutputFileName(const ProString &extraCompilerName)
+{
+ const ProString firstOutput = project->first(ProKey(extraCompilerName + ".output"));
+ return replaceExtraCompilerVariables(firstOutput.toQString(),
+ firstInputFileName(extraCompilerName).toQString(),
+ QString(), NoShell);
+}
+
ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QString, QString> &projLookup,
QHash<QString, QString> &projGuids,
QHash<VcsolutionDepend *, QStringList> &extraSubdirs,
@@ -1642,10 +1660,9 @@ void VcprojGenerator::initExtraCompilerOutputs()
extraCompile.Filter = "";
extraCompile.Guid = QString(_GUIDExtraCompilerFiles) + "-" + (*it);
-
// If the extra compiler has a variable_out set the output file
// is added to an other file list, and does not need its own..
- bool addOnInput = hasBuiltinCompiler(project->first(ProKey(*it + ".output")).toQString());
+ bool addOnInput = hasBuiltinCompiler(firstExpandedOutputFileName(*it));
const ProString &tmp_other_out = project->first(ProKey(*it + ".variable_out"));
if (!tmp_other_out.isEmpty() && !addOnInput)
continue;
diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h
index 3396ea4986..3f99e02e92 100644
--- a/qmake/generators/win32/msvc_vcproj.h
+++ b/qmake/generators/win32/msvc_vcproj.h
@@ -135,6 +135,8 @@ private:
QUuid increaseUUID(const QUuid &id);
QString retrievePlatformToolSet() const;
bool isStandardSuffix(const QString &suffix) const;
+ ProString firstInputFileName(const ProString &extraCompilerName) const;
+ QString firstExpandedOutputFileName(const ProString &extraCompilerName);
friend class VCFilter;
};