Skip to content

Modules: Guard calls to pkg_check_modules

Kai Pastor requested to merge dg0yt/cmake:pkg-config into master

Before calling pkg_check_modules, modules must check PKG_CONFIG_FOUND.

When FindPkgConfig.cmake is loaded, pkg_check_modules is always defined regardless of pkg-config being present. However, the whole module might be disabled on user request with CMAKE_DISABLE_FIND_PACKAGE_PkgConfig. This must not break Find modules which just look for a hint or similar.

Merge request reports

Loading