Don't add default lib dirs to LIBRARY_SEARCH_PATHS in xcode projects

Having hard-coded absolute paths in the xcode project breaks switching
between iOS and simulator builds.

Fixes: QTBUG-77804
Change-Id: Ib655bfc774b92c413a7b94ba4d005b6e1c4d2905
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
Joerg Bornemann 2019-08-26 13:48:03 +02:00
parent 7d0fff91dd
commit 97465b1540
1 changed files with 4 additions and 1 deletions

View File

@ -825,6 +825,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
}
if(!project->isActiveConfig("staticlib")) { //DUMP LIBRARIES
const ProStringList defaultLibDirs = project->values("QMAKE_DEFAULT_LIBDIRS");
ProStringList &libdirs = project->values("QMAKE_PBX_LIBPATHS"),
&frameworkdirs = project->values("QMAKE_FRAMEWORKPATH");
static const char * const libs[] = { "LIBS", "LIBS_PRIVATE",
@ -943,8 +944,10 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
}
if(slsh != -1) {
const QString path = QFileInfo(library.left(slsh)).absoluteFilePath();
if(!path.isEmpty() && !libdirs.contains(path))
if (!path.isEmpty() && !libdirs.contains(path)
&& !defaultLibDirs.contains(path)) {
libdirs += path;
}
}
library = fileFixify(library, FileFixifyFromOutdir | FileFixifyAbsolute);
QString key = keyFor(library);