[CMake] DEFINE_SYMBOL

Gary Kramlich grim at reaperworld.com
Sun Sep 4 03:40:11 EDT 2005


> Is there any way outside of creating a "config.h" to define multiple
> symbols for each libary, program, etc that was found when generating?  For
> example, I want to check for SDL and OpenGL, and I need a way for the
> library I'm writting to know that it can compile code that uses both of
> those.  Right now multiple calls to:
>
> SET_TARGET_PROPERTIES(target1 PROPERTIES
>                       DEFINE_SYMBOL HAVE_OPENGL
>                       DEFINE_SYMBOL HAVE_SDL)
>
> Is causing an overwrite, and there for all I'm seeing is HAVE_SDL as being
> defined.  I realize I can use FILE(write) and FILE(append) to create a
> config.h like autotools would, but was just wondering if there was an
> easier way than that.
>
> --
> Gary Kramlich <grim at reaperworld.com>

Sorry for replying to myself, but of course, after I send the email I find
ADD_DEFINITIONS which is exactly what I'm looking for.

-- 
Gary Kramlich <grim at reaperworld.com>



More information about the CMake mailing list