0028951: MathJax CDN shutting down
[occt.git] / dox / CMakeLists.txt
index a2aa89b..c489f3a 100644 (file)
@@ -35,14 +35,12 @@ endif()
 # configuration file for doxygen
 set (OCCT_CONFIG_FOR_DOXYGEN "${OCCT_GENERATED_DOC_DIR}/occt.cfg")
 
-set (3RDPARTY_MATHJAX_RELATIVE_PATH "http://cdn.mathjax.org/mathjax/latest")
-
-OCCT_VERSION (OCCT_SOURCE_VERSION)
+set (3RDPARTY_MATHJAX_RELATIVE_PATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1")
 
 configure_file ("${OCCT_OVERVIEW_RESOURCE_DIR}/occt_ug_html.doxyfile" "${OCCT_CONFIG_FOR_DOXYGEN}" COPYONLY)
 
 # Add common options for generation of Overview and User Guides
-file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_NUMBER         = ${OCCT_SOURCE_VERSION}")
+file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_NUMBER         = ${OCC_VERSION_STRING_EXT}")
 file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nOUTPUT_DIRECTORY       = ${OCCT_GENERATED_OVERVIEW_DIR}/.")
 file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_LOGO           = ${OCCT_OVERVIEW_DIR}/resources/occ_logo.png")
 
@@ -94,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")