D12672: Use a target in FindDiscount (modern cmake) rather than variables
Sune Vuorela
noreply at phabricator.kde.org
Sat May 5 16:48:12 UTC 2018
svuorela added a comment.
1. The current code only works if discount is installed into existing locations (discount_INCLUDE_DIR is never used), and as a user of the FindPackage, you don't have to care about the include directory. It comes from the target.
2. The whole thing with targets vs variables: if you link against a double colon target, it fails at cmake time if something is wrong. If something is wrong with the variable, it fails at link time. E.g. trying to link discard::Lib fails at cmake time, linking ${discard_LIBRARIES} gives a link error.
Using targets is much less error prone, and in general encouraged.
REPOSITORY
R223 Okular
REVISION DETAIL
https://phabricator.kde.org/D12672
To: svuorela, kde-buildsystem
Cc: aacid, #okular, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20180505/0dd4ab09/attachment.html>
More information about the Kde-buildsystem
mailing list