[cmake-developers] link_libraries command (was: Roadmap to CMake 3.0)

Rolf Eike Beer eike at sf-mail.de
Fri Oct 11 16:14:52 EDT 2013


Am Freitag, 11. Oktober 2013, 15:59:13 schrieb Brad King:
> On 10/11/2013 03:34 PM, Rolf Eike Beer wrote:
> > Can we do something against link_directories, please? This is a common
> > pitfall for everyone coming from plain Makefiles and probably other
> > people, too.
> I'd love to do so but the command still has a real purpose.
> Find modules can return MYPKG_LIBRARY_DIRS with a list of
> directories and MYPKG_LIBRARIES with a list of libraries by
> name rather than full path.  The only way to use these is
> 
>  find_package(MYPKG)
>  link_directories(${MYPKG_LIBRARY_DIRS})
>  target_link_libraries(myexe ${MYPKG_LIBRARIES})

Especially the pkg-config module should be changed if at all possible to avoid 
that.

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20131011/3027cd67/attachment.sig>


More information about the cmake-developers mailing list