[CMake] problem with ADD_DEFINITION

Laurentiu Nicolae Laurentiu.Nicolae at quintiq.com
Fri Aug 11 04:06:21 EDT 2006


Hi Nuno,

You should use INCLUDE_DIRECTORIES for the includes, ADD_DEFINITIONS is
meant for "real" definitions, e.g. -DWINDOWS .

Cheers,
Laurentiu
-- 

Laurentiu Nicolae
Senior Software Engineer
Quintiq

Tel: +31 (0)73 691 07 39
Fax: +31 (0)73 691 07 54
www.quintiq.com 

>>> On 10-Aug-06 at 9:27 PM, "Nuno Lopes" <nunoplopes at sapo.pt> wrote:
> Hello,
> 
> I'm new to cmake and I'm trying to port one of my projects to cmake,
but I'm
> having some difficulties with this:
> 
> # libxml2
> PKGCONFIG( libxml-2.0 XML_INCLUDE_DIR XML_LIBRARY_DIR XML_LINK_FLAGS
> XML_CFLAGS)
> IF( NOT XML_INCLUDE_DIR )
>     MESSAGE("WARNING: libxml2 is not installed.")
> ELSE( NOT XML_INCLUDE_DIR )
>     # Add libXML2 stuff
>     LINK_LIBRARIES(${XML_LINK_FLAGS})
>     ADD_DEFINITIONS(${XML_CFLAGS})
> ENDIF( NOT XML_INCLUDE_DIR )
> 
> 
> XML_CFLAGS is set to: -I/usr/include/libxml2
> 



Visit Quintiq at IBC2006 Amsterdam, September 8 - 12, 2006!
---
This message contains information that may be privileged or confidential
and is the property of Quintiq. It is only intended for the person to
whom it is addressed. If you are not the intended recipient, you are not
authorized to read, print, retain, copy, disseminate, distribute or use
this message or any part thereof. If you have received this message in
error, please notify the sender immediately and delete all copies of
this message. Please note that e-mails are susceptible to change,
therefore they are not binding. 


More information about the CMake mailing list