[CMake] problem with ADD_DEFINITION

Brad King brad.king at kitware.com
Tue Aug 15 11:02:16 EDT 2006


Nuno Lopes wrote:
> Thanks for your help. But in theory the cflags can include anything they
> like, (e.g. "-DHAVE_XPTO -I/tmp/xpto -Wl,-O"), so probably
> INCLUDE_DIRECTORIES isn't the right one to choose, am I right?

Full-fledged integration of CMake and pkgconfig has not been
implemented.  The PKGCONFIG macro was a user contribution to make
running pkgconfig easier.  You still have to parse the resulting options
using the STRING command and construct the proper inputs to
ADD_DEFINITIONS, INCLUDE_DIRECTORIES, and LINK_LIBRARIES.

I suggest trying to get things working by manually specifying the
locations in your CMake code.  Once you understand what the commands
need as input you can move on to extracting this information from PKGCONFIG.

-Brad


More information about the CMake mailing list