I am trying to wrap a library with BinaryBuilder that depends on libz. If I use the wizard, specifying “Zlib” as a dependency, I actually do get all the library files from zlib in my workspace that I need. However, for my library to find the dependencies, I seem to have to pass the full path to the library dependency to configure, like so:
CFLAGS=-I/workspace/artifacts/7846a2956a213715c2c76632f3461cef87d9d545/include \
LDFLAGS=-L/workspace/artifacts/7846a2956a213715c2c76632f3461cef87d9d545/lib \
./configure ...
However, the exact artifacts path changes from platform to platform, thus I have no way to write a build script that is portable and looks sane. I checked other libraries that have binary dependencies (e.g., Yggdrasil/build_tarballs.jl at 029e588412f232f215e5e6a7564693d3dbf8e922 · JuliaPackaging/Yggdrasil · GitHub), but they do not seem to suffer from this problem.
Could someone tell me a better way to reference to binary dependencies than this (there must be a better way…)?