Update mussa to build on ubuntu 10.04 with qt 4.6.2 +boost 1.40.0.1
[mussa.git] / makelib / FindDocutils.cmake
1 # Macros to make using docutils to build documentation easier
2
3 FIND_PROGRAM(RST2HTML_PY
4              NAMES rst2html.py rst2html
5              DOC "location of the python docutils reStructured text html "
6                  "converter"
7              )
8
9 IF(RST2HTML_PY)
10   MACRO(RST2HTML)
11     FOREACH(it ${ARGN})
12       GET_FILENAME_COMPONENT(basename ${it} NAME_WE)
13
14       SET(infile ${CMAKE_CURRENT_SOURCE_DIR}/${it} )
15       SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/${basename}.html)
16
17       ADD_CUSTOM_COMMAND(
18         OUTPUT ${outfile} 
19         COMMAND ${RST2HTML_PY} 
20         ARGS ${infile} ${outfile}
21         DEPENDS ${infile}
22       )
23
24       ADD_CUSTOM_TARGET(RstHTMLDocuments_${outfile} ALL DEPENDS ${outfile})
25
26     ENDFOREACH(it)
27   ENDMACRO(RST2HTML)
28 ENDIF(RST2HTML_PY)
29
30 # There really should be some code for building the pdf as well