0028951: MathJax CDN shutting down
[occt.git] / dox / CMakeLists.txt
index 4e64e34..c489f3a 100644 (file)
@@ -35,7 +35,7 @@ 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")
+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)
 
@@ -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")