Support pkg-config --define-prefix
pkg-config
modules are well known for not being relocatable, the only option (AFAIK) to overcome this issue is using the --define-prefix
argument on each call. It would be great to have this feature as part of FindPkgConfig.
This will be an example of how it could be used:
pkg_search_module(glib REQUIRED IMPORTED_TARGET REDEFINE_PREFIX glib-2.0)
Use cases:
- building a project with a relocatable version of glib-2.0 binaries
- projects built using conan (were all the binaries are relocatable)