Closed lucab closed 4 years ago
Followup to https://github.com/rpm-software-management/librepo/pull/203. I've checked that this builds fine in (at least) the following buildroots:
For context, the build failure is pretty much the same as shown in https://github.com/libcheck/check/issues/60 and the cmake fix in here is also modeled after those additional linking flags.
To me it seems the transitive dependencies shouldn't be part of our CMakeLists.txt. libcheck
uses pkg-config, see the output of pkg-config --libs check
and pkg-config --libs --static check
. The PKG_CHECK_MODULES
macro should work for this.
@lukash ah, you are absolutely right, I did not realize the .pc file was already covering all cases. I've amended the PR to use that, how does it looks now?
Thanks @lucab
This tweaks tests linkage in order to bring in transitive dependencies for
libcheck
. It fixes linking issues when building tests on systems with a staticlibcheck
library.