[CMake] problem with ADD_DEFINITION

Tim Teulings rael at edge.ping.de
Tue Aug 15 12:07:58 EDT 2006


Hello!

>> 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.

I recently submitted a better (but incompatible) version of a PKGCONFIG
macro, which already fills the relevant variables and thus is far
simpler to use. I did not get any response or the requested discussion
:-/ Seeing you still proposing the old macro makes things even more sad :-/

Btw., after working even more with cmake I see even improvement for my
version of the macro. Instead of passing all variables to the macro you
just pass a name prefix and make the macro define the variables
following the naming schema of similar macros itself - similar to the
way the equivalent autoconf macro works.

-- 
Gruß...
       Tim.


More information about the CMake mailing list