[CMake] defining preprocessor statements

Stefan Buschmann s_buschmann at gmx.de
Sat Oct 20 11:55:26 EDT 2007


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
>   



More information about the CMake mailing list