]> Creatis software - bbtk.git/blob - kernel/cmake/BBTKBuildHtmlDocFromLatex.cmake
*** empty log message ***
[bbtk.git] / kernel / cmake / BBTKBuildHtmlDocFromLatex.cmake
1
2
3 MACRO(BBTK_BUILD_HTML_DOC_FROM_LATEX TEX_FILE OUTPUT_REL_PATH)
4   # Need tth
5   SET(USE_TTH ON CACHE BOOL "" FORCE)
6   # Construct absolute build path
7   SET(BUILD_PATH ${BBTK_DOC_BUILD_PATH}/${OUTPUT_REL_PATH})
8   #-------------------------------------------------------------------------
9   ##  MESSAGE(STATUS ${LATEX_tth_CONVERTER})
10   
11   ADD_CUSTOM_COMMAND(
12     OUTPUT ${BUILD_PATH}/${TEX_FILE}.html
13     COMMAND 
14     #    tth 
15     ${LATEX_tth_CONVERTER}
16     ARGS
17     -e2 ${BUILD_PATH}/${TEX_FILE}.tex 2>tth.log
18  #   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.pdf
19     )
20   ADD_CUSTOM_TARGET(${TEX_FILE}.html ALL
21     DEPENDS ${BUILD_PATH}/${TEX_FILE}.html
22     )
23   # Install
24   INSTALL( 
25     FILES ${BUILD_PATH}/${TEX_FILE}.html
26     DESTINATION ${BBTK_DOC_INSTALL_PATH}/${OUTPUT_REL_PATH}
27     )   
28   #-------------------------------------------------------------------------
29   
30 ENDMACRO(BBTK_BUILD_HTML_DOC_FROM_LATEX)