summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/metamakefile.cpp2
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp39
-rw-r--r--qmake/option.cpp2
-rw-r--r--qmake/project.cpp17
4 files changed, 47 insertions, 13 deletions
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index 9c64544..ad8750b 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -476,7 +476,7 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO)
mkfile = new NmakeMakefileGenerator;
} else if(gen == "MSBUILD") {
// Visual Studio >= v11.0
- if(proj->first("TEMPLATE").indexOf(QRegExp("^vc.*")) != -1 || proj->first("TEMPLATE").indexOf(QRegExp("^ce.*")) != -1)
+ if (proj->first("TEMPLATE").startsWith("vc"))
mkfile = new VcxprojGenerator;
else
mkfile = new NmakeMakefileGenerator;
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 99cdd11..75fc910 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -2656,6 +2656,14 @@ bool VCXFilter::outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter, const QSt
xml << tag("ClCompile")
<< attrTag("Include",Option::fixPathToLocalOS(filename));
+ } else if(filename.endsWith(".res")) {
+
+ xmlFilter << tag("CustomBuild")
+ << attrTag("Include",Option::fixPathToLocalOS(filename))
+ << attrTagS("Filter", filtername);
+
+ xml << tag("CustomBuild")
+ << attrTag("Include",Option::fixPathToLocalOS(filename));
} else {
xmlFilter << tag("CustomBuild")
@@ -2665,6 +2673,16 @@ bool VCXFilter::outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter, const QSt
xml << tag("CustomBuild")
<< attrTag("Include",Option::fixPathToLocalOS(filename));
}
+ } else if(filtername == "Root Files") {
+
+ if (filename.endsWith(".rc")) {
+
+ xmlFilter << tag("ResourceCompile")
+ << attrTag("Include",Option::fixPathToLocalOS(filename));
+
+ xml << tag("ResourceCompile")
+ << attrTag("Include",Option::fixPathToLocalOS(filename));
+ }
}
}
@@ -2696,8 +2714,6 @@ bool VCXFilter::outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter, const QSt
<< attrTag("Condition", QString("'$(Configuration)|$(Platform)'=='%1'").arg((*Config).Name))
<< valueTag(CompilerTool.PrecompiledHeader);
}
-
- //xml << CompilerTool;
}
}
@@ -3023,6 +3039,14 @@ void VCXProject::outputFileConfigs(XmlOutput &xml,
xml << tag("ClCompile")
<< attrTag("Include",Option::fixPathToLocalOS(info.file));
+ } else if(info.file.endsWith(".res")) {
+
+ xmlFilter << tag("CustomBuild")
+ << attrTag("Include",Option::fixPathToLocalOS(info.file))
+ << attrTagS("Filter", filtername);
+
+ xml << tag("CustomBuild")
+ << attrTag("Include",Option::fixPathToLocalOS(info.file));
} else {
xmlFilter << tag("CustomBuild")
@@ -3033,6 +3057,16 @@ void VCXProject::outputFileConfigs(XmlOutput &xml,
<< attrTag("Include",Option::fixPathToLocalOS(info.file));
}
+ } else if(filtername == "Root Files") {
+
+ if (info.file.endsWith(".rc")) {
+
+ xmlFilter << tag("ResourceCompile")
+ << attrTag("Include",Option::fixPathToLocalOS(info.file));
+
+ xml << tag("ResourceCompile")
+ << attrTag("Include",Option::fixPathToLocalOS(info.file));
+ }
} else {
xmlFilter << tag("None")
@@ -3329,6 +3363,7 @@ XmlOutput &operator<<(XmlOutput &xml, VCXProject &tool)
for (int x = 0; x < tool.ExtraCompilers.count(); ++x) {
tool.outputFilter(xml, xmlFilter, tool.ExtraCompilers.at(x));
}
+ tool.outputFilter(xml, xmlFilter, "Root Files");
xml << import("Project", "$(VCTargetsPath)\\Microsoft.Cpp.targets");
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 13e855c..8db3797 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -304,6 +304,7 @@ Option::parseCommandLine(int argc, char **argv, int skip)
} else if(opt == "nodependheuristics") {
Option::mkfile::do_dep_heuristics = false;
} else if(opt == "E") {
+ fprintf(stderr, "-E is deprecated. Use -d instead.\n");
Option::mkfile::do_preprocess = true;
} else if(opt == "cache") {
Option::mkfile::cachefile = argv[++x];
@@ -558,7 +559,6 @@ void Option::applyHostMode()
Option::dir_sep = "/";
Option::obj_ext = ".o";
}
- Option::qmake_abslocation = Option::fixPathToTargetOS(Option::qmake_abslocation);
}
bool Option::postProcessProject(QMakeProject *project)
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 998d173..2be68be 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1046,7 +1046,7 @@ QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place, int num
SKIP_WS(d, d_off, s.length());
QString vals = s.mid(d_off); // vals now contains the space separated list of values
int rbraces = vals.count('}'), lbraces = vals.count('{');
- if(scope_blocks.count() > 1 && rbraces - lbraces == 1) {
+ if(scope_blocks.count() > 1 && rbraces - lbraces == 1 && vals.endsWith('}')) {
debug_msg(1, "Project Parser: %s:%d : Leaving block %d", parser.file.toLatin1().constData(),
parser.line_no, scope_blocks.count());
ScopeBlock sb = scope_blocks.pop();
@@ -1073,7 +1073,7 @@ QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place, int num
}
if(vals.contains('=') && numLines > 1)
- warn_msg(WarnParser, "Detected possible line continuation: {%s} %s:%d",
+ warn_msg(WarnParser, "Possible accidental line continuation: {%s} at %s:%d",
var.toLatin1().constData(), parser.file.toLatin1().constData(), parser.line_no);
QStringList &varlist = place[var]; // varlist is the list in the symbol table
@@ -3099,13 +3099,12 @@ QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList
place[var] = QStringList(Option::obj_ext);
}
} else if (var == QLatin1String("QMAKE_QMAKE")) {
- if (place[var].isEmpty()) {
- if (!Option::qmake_abslocation.isNull())
- place[var] = QStringList(Option::qmake_abslocation);
- else
- place[var] = QStringList(Option::fixPathToTargetOS(
- QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmake", false));
- }
+ if (place[var].isEmpty())
+ place[var] = QStringList(Option::fixPathToTargetOS(
+ !Option::qmake_abslocation.isEmpty()
+ ? Option::qmake_abslocation
+ : QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmake",
+ false));
} else if (var == QLatin1String("EPOCROOT")) {
if (place[var].isEmpty())
place[var] = QStringList(epocRoot());