@@ -44,12 +44,27 @@ if(NOT Catch2_FOUND)
4444 message (FATAL_ERROR "Catch2 not found" )
4545endif ()
4646
47- find_package (Doxygen REQUIRED)
48- configure_file (
49- docs/Doxyfile
50- ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
51- @ONLY
52- )
47+ find_package (Doxygen QUIET )
48+ if (Docxygen_FOUND)
49+ configure_file (
50+ docs/Doxyfile
51+ ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
52+ @ONLY
53+ )
54+
55+ add_custom_command (
56+ OUTPUT ${CMAKE_BINARY_DIR} /docs/doxygen/xml/index.xml
57+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR} /docs/doxygen
58+ COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR} /Doxyfile
59+ DEPENDS ${CMAKE_SOURCE_DIR} /include /mystd/
60+ COMMENT "Generating Doxygen XML..."
61+ )
62+
63+ add_custom_target (docs
64+ DEPENDS ${CMAKE_BINARY_DIR} /docs/doxygen/xml/index.xml
65+ COMMAND ${SPHINX_EXECUTABLE} -M html ${CMAKE_SOURCE_DIR} /docs/sphinx ${CMAKE_BINARY_DIR} /docs/sphinx
66+ )
67+ endif ()
5368
5469include_directories (include )
5570
@@ -92,16 +107,3 @@ if(ENABLE_COVERAGE)
92107 message (WARNING "lcov or genhtml not found, coverage report generation disabled" )
93108 endif ()
94109endif ()
95-
96- add_custom_command (
97- OUTPUT ${CMAKE_BINARY_DIR} /docs/doxygen/xml/index.xml
98- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR} /docs/doxygen
99- COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR} /Doxyfile
100- DEPENDS ${CMAKE_SOURCE_DIR} /include /mystd/
101- COMMENT "Generating Doxygen XML..."
102- )
103-
104- add_custom_target (docs
105- DEPENDS ${CMAKE_BINARY_DIR} /docs/doxygen/xml/index.xml
106- COMMAND ${SPHINX_EXECUTABLE} -M html ${CMAKE_SOURCE_DIR} /docs/sphinx ${CMAKE_BINARY_DIR} /docs/sphinx
107- )
0 commit comments