Skip to content

Commit

Permalink
Don't add default lib dirs to LIBRARY_SEARCH_PATHS in xcode projects
Browse files Browse the repository at this point in the history
Having hard-coded absolute paths in the xcode project breaks switching
between iOS and simulator builds.

Fixes: QTBUG-77804
Change-Id: Ib655bfc774b92c413a7b94ba4d005b6e1c4d2905
(cherry picked from commit 97465b1)
Reviewed-by: Tor Arne Vestbø <[email protected]>
  • Loading branch information
jobor committed Sep 3, 2019
1 parent 7b82d27 commit abfb1b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion qmake/generators/mac/pbuilder_pbx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,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",
Expand Down Expand Up @@ -967,8 +968,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);
Expand Down

0 comments on commit abfb1b8

Please sign in to comment.