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 <oswald.buddenhagen@qt.io>
bb10
Christoph Keller 2018-07-03 17:17:48 +02:00
parent 9fc6b021f9
commit ebd04a5aa8
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}
}
}