Check versions for individual components of Wayland

Review Request #116598 - Created March 4, 2014 and submitted

Aurélien Gâteau
buildsystem, extracmakemodules, kdeframeworks
First part of the diff makes sure find_package_handle_standard_args() gets a version number to check against.

Second part ensures we get proper results from pkg-config even if not all components are available. find_package(Wayland COMPONENTS Client Egl) was failing for me because I have Client installed but not Egl, causing pkg_check_modules() to not set any PKG_Wayland_${comp} variable.

Together with a change for kde-workspace, it fixes the build of kde-workspace on my system with wayland-client 1.1 and no wayland-egl.
Martin Flöser
Aleix Pol Gonzalez
Kevin Ottens
Commit Hook
This review has been submitted with commit a5e59578725c79cd8f46e261a910223b1d36a738 by Aurélien Gâteau to branch master.
Aurélien Gâteau
Review request changed

Status: Closed (submitted)

Alex Merry
Note that find_package(Wayland COMPONENTS Client Egl) *should* fail.  What shouldn't fail is find_package(Wayland OPTIONAL_COMPONENTS Client Egl).
  1. I hadn't realised that about pkg_check_modules(), though.  I'll have to update the docs I wrote.
  2. Oh, I didn't know about OPTIONAL_COMPONENTS. Anyway, the fix is here to ensure early fail: without it one could not check for a minimum version of Wayland.
  3. I think the last fphsa call should cause the version to be checked.  The version-checking change you made should only make any difference if you have components with different versions installed.  Your change just makes it fail sooner.