diff --git a/CMakeLists.txt b/CMakeLists.txt index bc625ac1..1fbcd6a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -464,12 +464,13 @@ function(add_doc_target) ${CMAKE_COMMAND} -E env PYTHONPATH=${CMAKE_CURRENT_SOURCE_DIR}/support/python ${MKDOCS} build -f ${CMAKE_CURRENT_SOURCE_DIR}/support/mkdocs.yml - --site-dir ${CMAKE_CURRENT_BINARY_DIR}/doc/html + # MkDocs requires the site dir to be outside of the doc dir. + --site-dir ${CMAKE_CURRENT_BINARY_DIR}/doc-html --no-directory-urls SOURCES ${sources}) include(GNUInstallDirs) - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/ + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc-html/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/doc/fmt OPTIONAL) endfunction()