Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,14 @@ find_package( Sphinx )
if( SPHINX_EXECUTABLE )
configure_file( "${PROJECT_SOURCE_DIR}/doc/conf.py.in" "${PROJECT_BINARY_DIR}/conf.py" )

# copy the config file to the build directory
# Copy doc sources to the build directory so Sphinx generates autosummary
# stubs (generated/) in the build tree, not the source tree.
file(COPY "${PROJECT_SOURCE_DIR}/doc/" DESTINATION "${PROJECT_BINARY_DIR}/doc_src/"
PATTERN "*.png" PATTERN "*.ico" PATTERN "*.pdf" PATTERN "*.py.in" EXCLUDE)

Comment thread
mhier marked this conversation as resolved.
message( STATUS "Html documentation support enabled; use 'make doc' to build it." )
add_custom_target( doc ALL
COMMAND "${SPHINX_EXECUTABLE}" -c "${PROJECT_BINARY_DIR}" -b html "${PROJECT_SOURCE_DIR}/doc" "doc/html"
COMMAND "${SPHINX_EXECUTABLE}" -c "${PROJECT_BINARY_DIR}" -b html "${PROJECT_BINARY_DIR}/doc_src" "doc/html"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating HTML documentation" VERBATIM )

Expand Down