[CMake] defining preprocessor statements

Mark Wyszomierski markww at gmail.com
Sat Oct 20 12:12:25 EDT 2007


Thanks Stefan.

When I do that, I see the following text in the Preprocessor
Definitions field (in vc++ 2005):

    ",WIN32,WINDOWS,"

I'm wondering if the leading and trailing commas will be a problem?

Thanks,
Mark

On 10/20/07, Stefan Buschmann <s_buschmann at gmx.de> wrote:
> Use ADD_DEFINITIONS:
>
> ADD_DEFINITIONS(-DWIN32 -DWINDOWS)
>
> - Stefan
>
>
> Mark Wyszomierski schrieb:
> > Hi,
> >
> > How do we define a preprocessor statement - in win32 projects you
> > usually need to see the following in the C/C++ -> Preprocessor
> > statements section:
> >
> >     _WIN32, _WINDOWS  ...etc....
> >
> > so in the CMakeLists.txt, what syntax is used to put that into the
> > generated project files?
> >
> > Thanks,
> > Mark
> > _______________________________________________
> > CMake mailing list
> > CMake at cmake.org
> > http://www.cmake.org/mailman/listinfo/cmake
> >
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>


More information about the CMake mailing list