CREATE_PROJECT: Use relative paths for static libraries for Xcode

With the project including both iOS and macOS targets, using an
absolute path ensures it is incorrect for one of those. Since it was
using /usr/local/lib/ all the paths had to be changed in Xcode to
build the iOS target.

Also as the paths where we expect the libraries to be (/usr/local/lib
on macOS and lib under the build directory for iOS) are added to the
search path in the Xcode project, we do not actually need to use
absolute path). Also this make it easier to use a different path for
libraries (e.g. if using MacPort or brew) as we only need to change
the search path setting in the Xcode project and not the
path for each library).
This commit is contained in:
Thierry Crozat 2020-04-11 21:08:56 +01:00 committed by Eugene Sandulenko
parent 70eb9a061c
commit 5b617c1eef

View file

@ -408,7 +408,7 @@ void XcodeProvider::setupCopyFilesBuildPhase() {
#define DEF_LOCALLIB_STATIC_PATH(path,lib,absolute) properties[lib".a"] = FileProperty("archive.ar", lib ".a", path, (absolute ? "\"<absolute>\"" : "\"<group>\"")); \
ADD_SETTING_ORDER_NOVALUE(children, getHash(lib".a"), lib".a", fwOrder++);
#define DEF_LOCALLIB_STATIC(lib) DEF_LOCALLIB_STATIC_PATH("/usr/local/lib/" lib ".a", lib, true)
#define DEF_LOCALLIB_STATIC(lib) DEF_LOCALLIB_STATIC_PATH(lib ".a", lib, false)
/**