[build2] Naming of library imports from pkg-config files

Christopher Head build2 at chead.ca
Sun Jul 30 08:07:01 UTC 2023


Hi,
I’m trying to build against a system library (almost certainly built
with something other than build2) that provides a properly installed .pc
file (in /usr/lib64/pkgconfig, as one would expect). It’s working fine,
but there’s something I haven’t been able to figure out from the
documentation. In my buildfile, I have a line of this form:

import libs = foo%lib{bar}

“foo” is easy: it’s the basename of the .pc file (or at least it seems
to be). But what am I supposed to write for “bar”? I haven’t been able
to find where the meaning of that part is documented for .pc-file-based
imports specifically. Experimentally, it seems as if I can write
anything nonempty there, but that bothers me since I assume there’s
probably some kind of rule or guideline I just haven’t found yet and
may be silently breaking things.

Thanks,
-- 
Christopher Head



More information about the users mailing list