On 06/06/14 07:18, Chad Versace wrote: > On Sat, May 31, 2014 at 03:22:02AM +0100, Emil Velikov wrote: >> Silence the pkg_check_modules and check set the default >> options depending on the packages found. > > This is a good idea and will make Waffle easier to configure for > everyone. > > There are a few problems though. > > If configuration fails because the user tried to enable a platform for > which his system lacks the dependencies, then post-patch CMake no longer > gives sufficient explanation why it failed. For example, if > -Dwaffle_has_gbm=1 fails, CMake informs the user thta "gbm requirements > are not met" but does explain what those requirements are. And, since > waffle_pkg_config is now silenced by QUIET, CMake's earlier output > provides no clue. > > To avoid providing the user a silent mystery, this block > >> + if(waffle_has_wayland) >> + if(NOT wayland-client_FOUND OR >> + NOT wayland-egl_FOUND OR NOT egl_FOUND) >> + message(FATAL_ERROR "wayland requirements are not met.") >> + endif() >> + endif() > > should explain which requirements, including the version if any, were > not met. For example, if -Dwaffle_has_wayland=1 but the system lacks > wayland-egl>=9.1, then CMake should print something like > "wayland dependency is missing: wayland-egl>=9.1" > or > "wayland requirement wayland-egl>=9.1 is not met" > This would add a few extra lines, although it would be very nice to have.
> > Why did you decide to silece waffle_pkg_config with QUIET? I feel that > it's useful to get notification for each item that CMake probes for. > Was under the impression that when REQUIRED|QUIET is missing cmake defaults to the former, which errors out when the package is missing. Seems like I got confused with another cmake command. Updated patch will follow shortly. -Emil _______________________________________________ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle