Currently, we can use pkg_check_modules
with IMPORTED_TARGET
to create a PkgConfig::prefix
target which is nice and clean. Something like:
find_package(PkgConfig REQUIRED)
pkg_check_modules(rsvg REQUIRED librsvg-2.0 IMPORTED_TARGET)
But it seems we cannot create a static variant of the target to use. Is that intended or just a possible missing feature? If it’s intended, what’s the preferred usage to create a clean static target of the library to use? Or if it’s the latter case, will creating a PkgConfig::prefixStatic
at the same time when we creating PkgConfig::prefix
be a good approach to do so?