[CMake] How to specify library dir for imported interface?

Francis Giraldeau francis.giraldeau at gmail.com
Mon Jul 9 14:37:22 EDT 2018


Le mer. 4 juil. 2018 à 10:43, Marc CHEVRIER <marc.chevrier at gmail.com> a
écrit :

> Next version of CMake (3.13) will supports properties LINK_OPTIONS as well
> as INTERFACE_LINK_OPTIONS.
>

Interesting, will it fix the issue with pkg-config? When installed in a
non-standard directory, pkg-config will return the library dir. Here is an
example with libsodium:

$ PKG_CONFIG_PATH=/tmp/bidon/lib/pkgconfig pkg-config --libs libsodium
-L/tmp/bidon/lib -lsodium

At first, the property INTERFACE_LINK_DIRECTORIES would make sens. Would
there be some drawbacks to specify link directories for imported targets?

Cheers,

Francis
-- 
Francis Giraldeau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180709/01082c7f/attachment.html>


More information about the CMake mailing list