[CMake] preprocessor def

Eric Noulard eric.noulard at gmail.com
Fri Feb 15 16:56:51 EST 2008


2008/2/15, Harsha Sri-Narayana <h.sri-narayana at cs.ucl.ac.uk>:
> I have this code in a cpp file
>
>  #ifdef USE_GLEW
>  #include <GL/glew.h>
>  #endif
>
>
>  I have this in a cmakelists.txt file:
>
>  SET_TARGET_PROPERTIES(rtf PROPERTIES
>  LINKER_LANGUAGE CXX
>  COMPILE_FLAGS "USE_GLEW"
>  )

Could you try

COMPILE_FLAGS "-DUSE_GLEW"

(add the -D yourself for defining the MACRO).


-- 
Erk


More information about the CMake mailing list