config.h.cmake issue ?

Brad King brad.king at kitware.com
Wed May 3 18:17:20 CEST 2006


David Faure wrote:
> But for this we need a #cmakedefine equivalent that sets 0 or 1, instead of "undef or 1".
> Could this be done?

Put this in the input file:

#define HAVE_FOO @HAVE_FOO@

Then make sure the CMake code sets HAVE_FOO to either "1" or "0".  This 
can be done with

if(HAVE_FOO)
   set(HAVE_FOO 1)
else(HAVE_FOO)
   set(HAVE_FOO 0)
endif(HAVE_FOO)

which could be packaged in a macro:

kde4_config_define(HAVE_FOO)

-Brad


More information about the Kde-buildsystem mailing list