[CMake] including lib

2008-02-26 Thread Harsha Sri-Narayana
I'm having a bit of trouble linking to a library. I have a library in a non standard place so I don't think I can use the findglut.cmake helper script. I have this so far: . . find_library(glut name "glut32.lib" PATHS "Z:/Opt/lib" NO_DEFAULT_PATH) . . . target_link_libraries(mytarget ${glut})

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-0000 Harsha Sri-Narayana wrote: I have this code in a cpp file #ifde

[CMake] preprocessor def

2008-02-15 Thread Harsha Sri-Narayana
I have this code in a cpp file #ifdef USE_GLEW #include #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, "The COMP