]> Creatis software - creaMiniTools.git/blob - cmake/UserBuildHtmlDocFromLatex.cmake
#3071 CreaMiniTools Feature New Normal - imageWriterExample with compress option
[creaMiniTools.git] / cmake / UserBuildHtmlDocFromLatex.cmake
1
2
3 MACRO(USER_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 ${${PROJECT_NAME}_DOC_BUILD_PATH}/${OUTPUT_REL_PATH})
8   #------------------------------------------------------------------------- 
9   #IF(WIN32)
10         #       SET(TTH_EXECUTABLE "${TTH_EXECUTABLE}/tth.exe")
11         #ENDIF(WIN32)
12         
13         #message("MACRO(USER_BUILD_HTML_DOC_FROM_LATEX TEX_FILE OUTPUT_REL_PATH) TTH_EXECUTABLE ${TTH_EXECUTABLE}")
14   ADD_CUSTOM_COMMAND(
15     OUTPUT ${BUILD_PATH}/${TEX_FILE}.html
16     COMMAND 
17     #    tth 
18     ${TTH_EXECUTABLE}
19     ARGS
20     -e2 ${BUILD_PATH}/${TEX_FILE}.tex 2>tth.log
21  #   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.pdf
22     )
23   ADD_CUSTOM_TARGET(${TEX_FILE}.html ALL
24     DEPENDS ${BUILD_PATH}/${TEX_FILE}.html
25     )
26   # Install
27   INSTALL( 
28     FILES ${BUILD_PATH}/${TEX_FILE}.html
29     DESTINATION ${${PROJECT_NAME}_DOC_INSTALL_PATH}/${OUTPUT_REL_PATH}
30     )   
31   #-------------------------------------------------------------------------
32   
33 ENDMACRO(USER_BUILD_HTML_DOC_FROM_LATEX)