pelikan
pelikan copied to clipboard
`check` package dependency check
@pbalcer reported test package broken on Ubuntu 18.04 and created a PR for pkg-config
, which I later reverted. There are two reasons: 1. I checked the variables set after calling pkgconfig
for check, which didn't seem to be doing all the right things here, and it breaks build on some other platform. 2. The CMake convention seems to prefer writing your own find_package
routine instead of using pkg-config
.
We still need to address the build problem on Ubuntu 18.04, this ticket will track that effort. We should explore a way that is consistent and robust on all platforms, which will require some digging and talking to folks.
You are right that the variables set by pkg-config
didn't match the ones the FindCheck.cmake
script sets - but it's arguable that it's the pkg-config
that does the wrong thing. But I'll admit that the way I did things broke stuff on some systems (worked on mine though :-)).
I think upstream projects should implement both pkg-config
as the primary source of information and find_package
as backup. This ensures that it's the library author (or the distro) that ultimately controls how the code is linked with an application through the use of .pc
files that are installed alongside the -dev package.
The immediate problem that I wanted to solve with my patch was to make sure that distro-installed libcheck also pulled in dependency on libsubunit - which the existing FindCheck.cmake
didn't do (and it probably shouldn't...).