From ebd04a5aa891521d577eeed152347310753af214 Mon Sep 17 00:00:00 2001 From: Christoph Keller Date: Tue, 3 Jul 2018 17:17:48 +0200 Subject: qmake: Fix xcode problems with invalid build paths Qmake accidentally replaced all occurrences of the library name in the build path. This would lead to problems if the (shadow) build path also contains the library name. Task-number: QTBUG-69279 Change-Id: If99acccc779ff0874433b193be7e7fc53625b245 Reviewed-by: Oswald Buddenhagen --- qmake/generators/mac/pbuilder_pbx.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qmake') diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 80891e682f..3206174d93 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -874,7 +874,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) name.chop(librarySuffix.length()); } } else { - library.replace(name, name + suffixSetting); + int pos = library.lastIndexOf(name); + if (pos != -1) + library.insert(pos + name.length(), suffixSetting); } } } -- cgit v1.2.3