summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp11
-rw-r--r--qmake/generators/makefile.h2
-rw-r--r--qmake/generators/win32/msvc_vcproj.h1
3 files changed, 10 insertions, 4 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index ccb3cfe810..42dd6c8aeb 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -853,8 +853,15 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
QString librarySuffix = project->first("QMAKE_XCODE_LIBRARY_SUFFIX").toQString();
suffixSetting = "$(" + suffixSetting + ")";
if (!librarySuffix.isEmpty()) {
- library.replace(librarySuffix, suffixSetting);
- name.remove(librarySuffix);
+ int pos = library.lastIndexOf(librarySuffix + '.');
+ if (pos == -1) {
+ warn_msg(WarnLogic, "Failed to find expected suffix '%s' for library '%s'.",
+ qPrintable(librarySuffix), qPrintable(library));
+ } else {
+ library.replace(pos, librarySuffix.length(), suffixSetting);
+ if (name.endsWith(librarySuffix))
+ name.chop(librarySuffix.length());
+ }
} else {
library.replace(name, name + suffixSetting);
}
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 61b8f9ac60..97159eaef4 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -185,7 +185,7 @@ protected:
virtual bool doDepends() const { return Option::mkfile::do_deps; }
void filterIncludedFiles(const char *);
- virtual void processSources() {
+ void processSources() {
filterIncludedFiles("SOURCES");
filterIncludedFiles("GENERATED_SOURCES");
}
diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h
index 35dc1e8937..50125a30a6 100644
--- a/qmake/generators/win32/msvc_vcproj.h
+++ b/qmake/generators/win32/msvc_vcproj.h
@@ -75,7 +75,6 @@ public:
protected:
virtual VCProjectWriter *createProjectWriter();
virtual bool doDepends() const { return false; } //never necesary
- virtual void processSources() { filterIncludedFiles("SOURCES"); filterIncludedFiles("GENERATED_SOURCES"); }
using Win32MakefileGenerator::replaceExtraCompilerVariables;
virtual QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &, ReplaceFor);
virtual bool supportsMetaBuild() { return true; }