I think my solution is a mix of yours and what Alvaro already has.

I use *find_package* for the PkgConfig, which is supported as a module by cmake (you can check it in the list by running *cmake --help-module-list*, it appears as *FindPkgConfig* and *UsePkgConfig*) and for the check module I use *pkg_check_modules* that he is already using but I just add the REQUIRED argument.

So this approach should work on all Linus systems.