[CMake] FindPkgConfig: Using *_LIBRARY_DIRS
Murray Cumming
murrayc at murrayc.com
Fri Oct 23 07:42:08 EDT 2009
pkg_search_module() defines SOMEPREFIX_LIBRARY_DIRS among other things,
as mentioned here
http://public.kitware.com/cgi-bin/viewcvs.cgi/Modules/FindPkgConfig.cmake?root=CMake&view=markup
(better than the documentation at
http://www.itk.org/Wiki/CMake:How_To_Find_Libraries
)
But how can I use those directories so my executable can actually be
linked against the SOMEPREFIX_LIBRARIES libraries that I've specified to
target_link_libraries().
Actually, I would much rather just tell the build system to use
SOMEPREFIX_LDFLAGS instead of dealing with the directories and libraries
separately. That's what I do with autoconf/automake.
Also, if I use several libraries, do I need separate pkg_search_module()
calls, and therefore several sets of variables? I'd much rather just
give a list of libraries and get one set of CFLAGS and LDFLAGS. Again,
that's what I do with autoconf/automake.
--
murrayc at murrayc.com
www.murrayc.com
www.openismus.com
More information about the CMake
mailing list