diff options
author | Josh Blum <josh@joshknows.com> | 2010-04-19 23:48:00 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-04-19 23:48:00 -0700 |
commit | 6b015b1c517733e85cb0c08a379e8d20377bf2fa (patch) | |
tree | 4c94d069b809bf7ad1f8aaf95542b7cbbdc6e4dc /host/docs | |
parent | 97b288f7d3ee0fc0fd596f6ba454cf07304474e0 (diff) | |
download | uhd-6b015b1c517733e85cb0c08a379e8d20377bf2fa.tar.gz uhd-6b015b1c517733e85cb0c08a379e8d20377bf2fa.tar.bz2 uhd-6b015b1c517733e85cb0c08a379e8d20377bf2fa.zip |
added comments to cmakelists, makedir in file generation script so python doesnt have to
Diffstat (limited to 'host/docs')
-rw-r--r-- | host/docs/CMakeLists.txt | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt index 52376fe8c..476023a1e 100644 --- a/host/docs/CMakeLists.txt +++ b/host/docs/CMakeLists.txt @@ -35,25 +35,33 @@ IF(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") ELSE(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") MESSAGE(STATUS "Checking for rst2html (docutils) - found") MESSAGE(STATUS " Enabled generation of HTML manual.") - SET(stylesheet ${CMAKE_CURRENT_SOURCE_DIR}/style.css) + + #setup rst2html options SET(rst2html_options - --stylesheet=${stylesheet} - --no-toc-backlinks - --date - --time + --stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/style.css + --no-toc-backlinks --date --time ) + + #create generation rule for each source FOREACH(rstfile ${manual_sources}) + #set input and output file names SET(rstfile ${CMAKE_CURRENT_SOURCE_DIR}/${rstfile}) GET_FILENAME_COMPONENT(rstfile_we ${rstfile} NAME_WE) SET(htmlfile ${CMAKE_CURRENT_BINARY_DIR}/${rstfile_we}.html) + + #make the html file depend on the rst file ADD_CUSTOM_COMMAND( OUTPUT ${htmlfile} DEPENDS ${rstfile} ${stylesheet} COMMAND ${RST2HTML} ${rstfile} ${htmlfile} ${rst2html_options} COMMENT "Generating ${htmlfile}" ) + + #make the manual target depend on the html file LIST(APPEND manual_html_files ${htmlfile}) INSTALL(FILES ${htmlfile} DESTINATION ${PKG_DOC_DIR}/manual/html) ENDFOREACH(rstfile ${manual_sources}) + + #make the html manual a build-time dependency ADD_CUSTOM_TARGET(manual_html ALL DEPENDS ${manual_html_files}) ENDIF(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") @@ -66,16 +74,24 @@ INCLUDE(FindDoxygen) IF(DOXYGEN_FOUND) MESSAGE(STATUS " Enabled generation of Doxygen documentation.") + + #generate the doxygen configuration file SET(CMAKE_CURRENT_BINARY_DIR_DOXYGEN ${CMAKE_CURRENT_BINARY_DIR}/doxygen) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) - ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} + + #make doxygen directory depend on the header files + FILE(GLOB_RECURSE header_files ${CMAKE_SOURCE_DIR}/include/*.hpp) + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DEPENDS ${header_files} COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile COMMENT "Generating documentation with doxygen" ) - ADD_CUSTOM_TARGET(doxygen_html ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN}) + + #make the doxygen generation a built-time dependency + ADD_CUSTOM_TARGET(doxygen_docs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN}) INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR}) ELSE(DOXYGEN_FOUND) MESSAGE(STATUS " Disabled generation of Doxygen documentation.") |