[Cmake] cmake newbie questions

Edward Zdankiewicz bzdank at sprynet.com
Thu Jan 30 14:55:03 EST 2003


To the cmake mailing list
When adding a layer to an already complicated tool chain (a c/c++ build
system) in an open source project that will always be suffering in the
documentation department you need to provide a simple print or echo feature
to the cmake tool. A way to echo 'I am here's or dump the contents of a
variable would be extremely useful.

my specific difficulty is in finding the glut package. GLUT_FOUND passes the
if test but the /I statement in the makefiles does not have an entry for the
gl stuff. I do get /I statements for the xerces and bugly2: If I manually
add /usr/include/GL to the include directories statement and remove the
${GLUT_INCLUDE_PATH} the makefiles will work.
INCLUDE (${CMAKE_ROOT}/Modules/FindGLUT.cmake)

IF (GLUT_FOUND)

INCLUDE_DIRECTORIES(/usr/include/xercesc ${GLUT_INCLUDE_PATH}
/usr/include/bugly2)

ELSE (GLUT_FOUND)

INCLUDE_DIRECTORIES(/usr/include/bugly)

ENDIF(GLUT_FOUND)


also:
How does one force a line into a makefile? I would love to add a simple line
like:
VPATH = linux_objs
into the make files and setting things in the cache doesn't do it, and using
SET in the cmakelist.txt doesn't do it. I want to be able to mimic the
Visual studio approach of subdirectories for the object files, to make the
task of packing up source distributions easier.

How does one control builds on linux with the debug options? I see in the
cache where -g is defined as a CMAKE_ debug flag, but I do not see a -g
option anywhere in the resulting makefiles so I am not sure how to turn this
on or off. Where does this show up?


Thank you for any help on this.


Edward Zdankiewicz
bzdank at sprynet.com




More information about the CMake mailing list