Generate RDC docs on make and put into package
DOxygen docs from rdc.h will be generated on build and a new pdf file will be created in the docs folder. Note that the generated pdf should should only be updated in the git repo when certain files are modified: * rdc.h Doxygen comments are updated (or any future files that are processed for Doxygen comments) * the Doxygen config file is updated Change-Id: I3084520f5b02aaa8e4973f9055d8679d6788b0ef
This commit is contained in:
@@ -182,19 +182,6 @@ set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
|
||||
set(CPACK_RPM_PACKAGE_NAME ${RDC_PACKAGE})
|
||||
set(CPACK_RPM_PACKAGE_VERSION ${PKG_VERSION_STR})
|
||||
|
||||
# Generate Doxygen documentation
|
||||
find_package(Doxygen)
|
||||
if (DOXYGEN_FOUND)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/rdc_doxygen.cfg
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||
add_custom_target(doc
|
||||
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API documentation with Doxygen" VERBATIM)
|
||||
else()
|
||||
message("Doxygen is not found. Will not generate documents.")
|
||||
endif(DOXYGEN_FOUND)
|
||||
|
||||
## Add the packaging directives
|
||||
include (CPack)
|
||||
|
||||
|
||||
@@ -164,6 +164,41 @@ install(TARGETS ${CLIENT_LIB}
|
||||
# DESTINATION ${RDC}/include/rdc
|
||||
# COMPONENT ${CLIENT_COMPONENT})
|
||||
|
||||
# Generate Doxygen documentation for client api manual
|
||||
find_package(Doxygen)
|
||||
find_package(LATEX COMPONENTS PDFLATEX)
|
||||
if (DOXYGEN_FOUND AND LATEX_FOUND)
|
||||
set (RDC_MANUAL_NAME "RDC_API_Manual")
|
||||
message("Building ${RDC_MANUAL_NAME}.pdf")
|
||||
configure_file(${PROJECT_SOURCE_DIR}/docs/rdc_doxygen.cfg
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.tex
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/docs/rdc_doxygen.cfg
|
||||
"${PROJECT_SOURCE_DIR}/include/rdc/rdc.h"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf
|
||||
COMMAND make > /dev/null
|
||||
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf
|
||||
${PROJECT_SOURCE_DIR}/docs/${RDC_MANUAL_NAME}.pdf
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.tex
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/latex)
|
||||
|
||||
add_custom_target(docs DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf)
|
||||
|
||||
add_dependencies(${CLIENT_LIB} docs)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf
|
||||
DESTINATION ${RDC}/docs/${RDC_MANUAL_NAME}.pdf
|
||||
COMPONENT ${CLIENT_COMPONENT})
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/docs/README.md
|
||||
DESTINATION ${RDC}/docs/
|
||||
COMPONENT ${CLIENT_COMPONENT})
|
||||
else()
|
||||
message("Doxygen or Latex is not found. Will not generate documents.")
|
||||
endif(DOXYGEN_FOUND AND LATEX_FOUND)
|
||||
|
||||
|
||||
message("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
|
||||
message(" Finished Cmake Client Lib ")
|
||||
message("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -758,8 +758,7 @@ WARN_LOGFILE =
|
||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/docs/README.md \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/include/rdc/rdc.h
|
||||
INPUT = @PROJECT_SOURCE_DIR@/include/rdc/rdc.h
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
@@ -908,7 +907,7 @@ FILTER_SOURCE_PATTERNS =
|
||||
# (index.html). This can be useful if you have a project on for instance GitHub
|
||||
# and want to reuse the introduction page also for the doxygen output.
|
||||
|
||||
USE_MDFILE_AS_MAINPAGE = @CMAKE_CURRENT_SOURCE_DIR@/docs/RDC_Intro.md
|
||||
USE_MDFILE_AS_MAINPAGE = @PROJECT_SOURCE_DIR@/docs/README.md
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to source browsing
|
||||
|
||||
Reference in New Issue
Block a user