CMakeLists.txt 1.06 KB
Newer Older
Dion Haefner's avatar
Dion Haefner committed
1 2
message(STATUS "Python modules path: ${DORIE_PYTHON_MODULES}")

Dion Haefner's avatar
Dion Haefner committed
3
add_subdirectory("doxygen")
Dion Haefner's avatar
Dion Haefner committed
4 5
add_subdirectory("default_files")

6 7 8 9
message(STATUS "Installing requirements for documentation")
set(INSTALL_CMD -m pip install -r ${CMAKE_CURRENT_SOURCE_DIR}/requirements.txt)
dune_execute_process(COMMAND "${DUNE_PYTHON_VIRTUALENV_EXECUTABLE}" "${INSTALL_CMD}"
	ERROR_MESSAGE "Error installing Documentation dependencies into virtualenv!")
Dion Haefner's avatar
Dion Haefner committed
10

11
configure_file(conf.py.in ${CMAKE_CURRENT_SOURCE_DIR}/conf.py)
12

13 14 15 16 17 18 19 20 21 22 23
set(SPHINX_EXECUTABLE ${DUNE_PYTHON_VIRTUALENV_PATH}/bin/sphinx-build)
add_custom_target(sphinx_html
                      COMMAND ${SPHINX_EXECUTABLE}
                                -b html
                                -w ${CMAKE_BINARY_DIR}/SphinxError.log
                                -c ${CMAKE_CURRENT_SOURCE_DIR}
                                ${CMAKE_CURRENT_SOURCE_DIR}
                                ${CMAKE_CURRENT_BINARY_DIR}/html
                      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
                     )
add_dependencies(sphinx_html doxygen_dorie)