[CMake] preprocessor def

2008-02-15 Thread Harsha Sri-Narayana
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 ) This doesn't work, couldn't anyone show me what I've done wrong? In the documentation it says,

Re: [CMake] preprocessor def

2008-02-15 Thread Eric Noulard
2008/2/15, Harsha Sri-Narayana [EMAIL PROTECTED]: 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

Re: [CMake] preprocessor def

2008-02-15 Thread Alan W. Irwin
On 2008-02-15 21:31- Harsha Sri-Narayana wrote: 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 ) This doesn't work, couldn't anyone show me

Re: [CMake] preprocessor def

2008-02-15 Thread Harsha Sri-Narayana
Thanks everyone. Both of these work. 1) ADD_DEFINITIONS(-DUSE_GLEW) 2) SET_TARGET_PROPERTIES(rtf PROPERTIES LINKER_LANGUAGE CXX COMPILE_FLAGS -DUSE_GLEW ) -Harsha Alan W. Irwin wrote: On 2008-02-15 21:31- Harsha Sri-Narayana wrote: I have this code in a cpp file #ifdef USE_GLEW