]> Creatis software - creaRigidRegistration.git/blob - cmake/UserBuildHtmlDocFromLatex.cmake
Replace deprecated SUBDIRS by ADD_SUBDIRECTORY
[creaRigidRegistration.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   
10   ADD_CUSTOM_COMMAND(
11     OUTPUT ${BUILD_PATH}/${TEX_FILE}.html
12     COMMAND 
13     #    tth 
14     ${TTH_EXECUTABLE}
15     ARGS
16     -e2 ${BUILD_PATH}/${TEX_FILE}.tex 2>tth.log
17  #   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.pdf
18     )
19   ADD_CUSTOM_TARGET(${TEX_FILE}.html ALL
20     DEPENDS ${BUILD_PATH}/${TEX_FILE}.html
21     )
22   # Install
23   INSTALL( 
24     FILES ${BUILD_PATH}/${TEX_FILE}.html
25     DESTINATION ${BBTK_DOC_INSTALL_PATH}/${OUTPUT_REL_PATH}
26     )   
27   #-------------------------------------------------------------------------
28   
29 ENDMACRO(USER_BUILD_HTML_DOC_FROM_LATEX)