Skip to content

FindKF6: Give better error message when required components are not found

Nicolas Fella requested to merge work/nico/findkf6-better-error into master

In the case where some KF6 components are found but required ones are missing we get a very terrible and confusing error message like

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find KF6 (missing: DBusAddons) (found suitable version "6.8.0", minimum required is "6.5.0")

This frequently confuses people into thinking the error is related to the version and not the fact that KDBusAddons is missing.

To address this check whether we are missing a required component and print an error ourselves:

CMake Error at /home/nico/kde/usr/share/ECM/find-modules/FindKF6.cmake:84 (message): Could NOT find required package KF6DBusAddons.

Merge request reports

Loading