1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0027339: CMake install should launch generation of overview documentation

Documentation is generated automatically during build/install process
Added check of minimum Doxygen version.
Install process causes generation of Overview documentation (unless already generated) by checking of occt_logo.png file existing.
Overview project regenerates documentation if any source file was changed.
This commit is contained in:
ski 2016-10-27 17:16:24 +03:00 committed by apn
parent 4945db69e5
commit 75378f50ea
2 changed files with 20 additions and 8 deletions

View File

@ -1,9 +1,10 @@
# doxygen
set (DOXYGEN_MINIMUM_VERSION 1.8.4)
if (DO_ONLY_CHECK_FOR_DOXYGEN)
message (STATUS "Info. Detecting doxygen")
set (DOXYGEN_SKIP_DOT ON)
find_package (Doxygen)
find_package (Doxygen ${DOXYGEN_MINIMUM_VERSION})
set (CAN_DOXYGEN_BE_USED OFF)
if (DOXYGEN_EXECUTABLE)
@ -33,7 +34,7 @@ else()
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE OR (NOT 3RDPARTY_SKIP_DOT_EXECUTABLE AND NOT 3RDPARTY_DOT_EXECUTABLE))
set (DOXYGEN_SKIP_DOT ${3RDPARTY_SKIP_DOT_EXECUTABLE})
find_package (Doxygen)
find_package (Doxygen ${DOXYGEN_MINIMUM_VERSION})
if (NOT 3RDPARTY_DOXYGEN_EXECUTABLE AND DOXYGEN_EXECUTABLE)
set (3RDPARTY_DOXYGEN_EXECUTABLE "${DOXYGEN_EXECUTABLE}" CACHE FILEPATH "${3RDPARTY_DOXYGEN_EXECUTABLE_DESCR}" FORCE)

View File

@ -92,11 +92,22 @@ file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nMATHJAX_RELPATH = ${3RDPARTY_M
# Copy index file to provide fast access to HTML documentation
file(COPY "${OCCT_OVERVIEW_RESOURCE_DIR}/index.html" DESTINATION "${OCCT_GENERATED_OVERVIEW_DIR}")
add_custom_target (${PROJECT_NAME}
COMMAND ${3RDPARTY_DOXYGEN_EXECUTABLE} ${OCCT_CONFIG_FOR_DOXYGEN}
WORKING_DIRECTORY ${OCCT_GENERATED_DOC_DIR}
COMMENT "Generating OCCT overview documentation with Doxygen"
SOURCES ${OCCT_ARTICLES_ABSPATH}
VERBATIM)
# get relative paths to documentation source files
file (GLOB_RECURSE OCCT_OVERVIEW_FILES "${OCCT_OVERVIEW_DIR}/*")
add_custom_command(OUTPUT "${OCCT_GENERATED_DOC_DIR}/overview/html/occt_logo.png"
COMMAND ${3RDPARTY_DOXYGEN_EXECUTABLE} ${OCCT_CONFIG_FOR_DOXYGEN}
DEPENDS ${OCCT_OVERVIEW_FILES}
WORKING_DIRECTORY ${OCCT_GENERATED_DOC_DIR}
COMMENT "Generating OCCT overview documentation with Doxygen"
VERBATIM
)
add_custom_target(${PROJECT_NAME} ALL
DEPENDS "${OCCT_GENERATED_DOC_DIR}/overview/html/occt_logo.png" ${OCCT_OVERVIEW_FILES}
SOURCES ${OCCT_ARTICLES_ABSPATH}
VERBATIM
)
# Create Documentation folder in solution view
set_property (TARGET ${PROJECT_NAME} PROPERTY FOLDER "Documentation")