With this change, a pre-build script will get the library and header flags needed for dependencies from pkg-config instead of having them hardcoded. This has allowed for building on my system (ARCH=arm64) with xcodebuild and in Xcode.app.
Xcode seems to have a version of pkg-config in its $PATH that doesn't check Homebrew pkgconfig directories. To get around that, the build takes an argument HOMEBREW_ROOT which defaults to /opt/homebrew (the current default path) and can be overrode in xcodebuild or by modifying the scheme's arguments.
For some reason the pre-build script doesn't run by default on xcodebuild, and I had to explicitly define the scheme to get it to kick off consistently:
With this change, a pre-build script will get the library and header flags needed for dependencies from pkg-config instead of having them hardcoded. This has allowed for building on my system (
ARCH=arm64
) with xcodebuild and in Xcode.app.Xcode seems to have a version of pkg-config in its
$PATH
that doesn't check Homebrew pkgconfig directories. To get around that, the build takes an argumentHOMEBREW_ROOT
which defaults to /opt/homebrew (the current default path) and can be overrode in xcodebuild or by modifying the scheme's arguments.For some reason the pre-build script doesn't run by default on xcodebuild, and I had to explicitly define the scheme to get it to kick off consistently: