cmake: help users by pointing out libsigrok build depencendies
authorGerhard Sittig <gerhard.sittig@gmx.net>
Tue, 3 Jul 2018 14:46:57 +0000 (16:46 +0200)
committerUwe Hermann <uwe@hermann-uwe.de>
Wed, 4 Jul 2018 11:02:08 +0000 (13:02 +0200)
commit844c4619ddbbab7d05ed01961f6b5957a3db75c5
tree5b1673a01dccb9e8e933c4ba76a8ba3b6b74e1ed
parent1e3a52e3dfc81b3b754b4e1282d15037249e79fe
cmake: help users by pointing out libsigrok build depencendies

It appears that users have trouble to relate failed PulseView builds to
missing dependencies during libsigrok configuration. Although the error
occurs early and is stated in the build output, it only gets noticed
late and users forgot about the earlier step, or never bothered to check.

Explicitly test for the availability of the C++ bindings, and print a
message that points to libsigrok's(!) configuration phase. Another
check for the full set of libraries will fail in fatal ways as before.

An unfortunate implementation detail of the cmake check leaves all parts
of the lookup result empty when either(!) of the tested libs is missing.
So we cannot tell with certainty which test failed when the test result
is negative while a list of libraries was passed to the test. That's why
the "soft" individual test with QUIET and without REQUIRED is the least
intrusive adjustment to existing CMake rules, where other locations
depend on the PKGDEPS_* variables.

This change addresses bug #1199.
CMakeLists.txt