http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_use_CMake_to_build_LaTeX_documents.3F
Cited piece of code: IF(LATEX_COMPILE) ADD_CUSTOM_COMMAND( OUTPUT ${Document_BINARY_DIR}/TDocument.dvi DEPENDS ${Document_BINARY_DIR}/TDocument.tex COMMAND ${LATEX_COMPILE} ARGS ${Document_SOURCE_DIR}/TDocument.tex ) ENDIF(LATEX_COMPILE) IF(DVIPDF_COMPILE) ADD_CUSTOM_COMMAND( OUTPUT ${Document_BINARY_DIR}/TDocument.pdf DEPENDS ${Document_BINARY_DIR}/TDocument.dvi COMMAND ${DVIPDF_COMPILE} ARGS ${Document_SOURCE_DIR}/TDocument.dvi ) ENDIF(DVIPDF_COMPILE) I have been reading about scons and cmake all morning, and I have to admit that I tilts towards scons even more now. I have learned too many languages and learning another one will simply confuse me more. You see, with the above example, I do not know DVIPDF_COMPILE is a string or bool, whether or not I can manipulate it etc. With scons, class is class, variable is variable, and string is string .... and I know I can use the re module to search for libboost..... Another good thing about icons is that we can distribute a minimal version of scon (called scons-local, just like the libtool files) so we do not have to require scon. Of course, cmake has to be compiled, but scons-local does not. Unless I find some essential problem with scons, I will not use cmake. (Of course, if you can rewrite our auto* with cmake, I will cheer like a real cheerleader. :-) Bo