jrl-umi3218 / jrl-cmakemodules

CMake utility toolbox
https://jrl-cmakemodules.readthedocs.io/en/master/
Other
59 stars 47 forks source link

pkg-config: use relative paths to allow relocatable packages #519

Closed nim65s closed 2 years ago

nim65s commented 2 years ago

To avoid writing absolute paths in generated cmake exports.

This doesn't seem to break things like pkg-config --libs eigenpy / pkg-config --cflags eigenpy, as ${pcfiledir} gets expanded to the right location of eg. eigenpy.pc, as the man says.

This is not really mandatory for my use cases, but it allow to write tools and automated tests that check for wrong absolute paths in generated cmake exports.