Skip to content
Snippets Groups Projects
Commit ff3c32a5 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

[bugfix] Fix the documentation procedure with installed modules

parent ae9816bc
No related branches found
No related tags found
No related merge requests found
......@@ -70,12 +70,22 @@ function(dune_cmake_sphinx_doc)
set(CMAKE_DOC_DEPENDENCIES "")
set(${CMAKE_PROJECT_NAME}_PREFIX ${CMAKE_SOURCE_DIR})
foreach(dep ${ALL_DEPENDENCIES} ${CMAKE_PROJECT_NAME})
# Check whether the module dep has specified some build system docs.
# Look for a build system documentation exported by the module dep
set(RSTFILE "")
# check in the correct path for non-installed modules
if(EXISTS ${${dep}_PREFIX}/doc/buildsystem/${dep}.rst)
set(RSTFILE ${${dep}_PREFIX}/doc/buildsystem/${dep}.rst)
endif()
# now check for the correct path taking into account installed ones
if(EXISTS ${${dep}_PREFIX}/share/doc/${dep}/${dep}.rst)
set(RSTFILE ${${dep}_PREFIX}/share/doc/${dep}/${dep}.rst)
endif()
# Now process the file, if we have found one
if(RSTFILE)
# add it to index.rst then.
set(CMAKE_DOC_DEPENDENCIES "${CMAKE_DOC_DEPENDENCIES} ${dep}\n")
# ... and copy the rst file to the current build.
configure_file(${${dep}_PREFIX}/doc/buildsystem/${dep}.rst ${CMAKE_CURRENT_BINARY_DIR}/${dep}.rst)
configure_file(${RSTFILE} ${CMAKE_CURRENT_BINARY_DIR}/${dep}.rst)
endif()
endforeach()
configure_file(${DUNE_SPHINX_EXT_PATH}/index.rst.in ${CMAKE_CURRENT_BINARY_DIR}/index.rst)
......
set(modules
conf.py.in
CreateDoxyFile.cmake
extract_cmake_data.py
FinalizeHeadercheck.cmake
FindFiles.cmake
index.rst.in
InstallFile.cmake
RunDoxygen.cmake
sphinx_cmake_dune.py)
......
add_subdirectory("doxygen")
add_subdirectory("buildsystem")
add_subdirectory("comm")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/example.opts
DESTINATION ${CMAKE_INSTALL_DOCDIR})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dunecontrol.1
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
# Install the buildsystem documentation defined in dune-common
install(FILES dune-common.rst DESTINATION ${CMAKE_INSTALL_DOCDIR})
# Also always build the CMake API documentation in dune-common
dune_cmake_sphinx_doc()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment