2013-08-07 16:40:18 +02:00
|
|
|
# generate the conf.py
|
2018-02-02 15:56:08 +01:00
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in ${CMAKE_CURRENT_BINARY_DIR}/conf.py @ONLY)
|
2013-08-07 16:40:18 +02:00
|
|
|
|
2018-02-02 15:56:08 +01:00
|
|
|
# ---------------------------------
|
|
|
|
# Top Sphinx target
|
|
|
|
# ---------------------------------
|
|
|
|
# Sources
|
|
|
|
file(GLOB_RECURSE sources *.rst)
|
2013-08-07 16:40:18 +02:00
|
|
|
|
|
|
|
# create documentation target
|
|
|
|
set(sphinx_top ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)
|
2018-02-02 15:56:08 +01:00
|
|
|
add_custom_command(OUTPUT ${sphinx_top} DEPENDS ${sources}
|
2018-03-13 13:23:52 +01:00
|
|
|
COMMAND ${TRIQS_SPHINXBUILD_EXECUTABLE} -c . -j8 -b html ${CMAKE_CURRENT_SOURCE_DIR} html)
|
2018-02-02 15:56:08 +01:00
|
|
|
add_custom_target(doc_sphinx ALL DEPENDS ${sphinx_top} ${CMAKE_CURRENT_BINARY_DIR})
|
2013-08-07 16:40:18 +02:00
|
|
|
|
2018-02-02 15:56:08 +01:00
|
|
|
# ---------------------------------
|
|
|
|
# Install
|
|
|
|
# ---------------------------------
|
2019-04-26 21:08:38 +02:00
|
|
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ COMPONENT documentation DESTINATION share/doc/triqs_dft_tools
|
2018-02-02 15:56:08 +01:00
|
|
|
FILES_MATCHING
|
2019-07-08 09:55:22 +02:00
|
|
|
REGEX "\\.(html|pdf|png|gif|jpg|js|xsl|css|py|txt|inv|bib|cfg)$"
|
2013-08-07 16:40:18 +02:00
|
|
|
PATTERN "_*"
|
|
|
|
)
|