On 05.03.20 22:38, Sebastian Kemper wrote:
This commit addresses this by doing the following two things:1. Instead of hard coding the paths in "Cflags" and "Libs" "${includedir}" and "${libdir}" are used. Note: these variables can be overriden on the pkg-config command line ("--define-variable=libdir=/some/path"). 2. Add the variables "prefix" and "exec_prefix". If "includedir" and/or "libdir" are using these then construct them accordingly. This is done because buildroots (for instance OpenWrt) tend to rename the real pkg-config and call it indirectly from a script that sets "prefix", "exec_prefix" and "bindir", like so:
Committed. I simplified your code a little bit, and I also made it so that exec_prefix is set to ${prefix} by default. That way it matches what most other .pc files I have found do.
