File: CMakeLists.txt

package info (click to toggle)
axe-demultiplexer 0.3.3+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 848 kB
  • sloc: ansic: 4,480; python: 352; makefile: 171; sh: 47
file content (26 lines) | stat: -rw-r--r-- 1,204 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FIND_PROGRAM(SPHINXBUILD sphinx-build)
IF(SPHINXBUILD)
    SET(ALLSPHINXOPTS -q -D latex_paper_size=a4)
    ADD_CUSTOM_TARGET(doc_html
        COMMAND ${SPHINXBUILD} -b html ${ALLSPHINXOPTS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/doc/html
        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
        )
    ADD_CUSTOM_TARGET(doc_onehtml
        COMMAND ${SPHINXBUILD} -b singlehtml ${ALLSPHINXOPTS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/doc/single
        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
        )
    ADD_CUSTOM_TARGET(doc_man
        COMMAND ${SPHINXBUILD} -b man ${ALLSPHINXOPTS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/doc/man
        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
        )
    ADD_CUSTOM_TARGET(doc_clean
	COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_BINARY_DIR}/doc"
        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
        )
    ADD_CUSTOM_TARGET(doc ALL DEPENDS doc_man doc_html doc_onehtml)
    INSTALL(FILES ${CMAKE_BINARY_DIR}/doc/man/axe.1 DESTINATION "share/man/man1" RENAME "axe-demux.1")
    SET_DIRECTORY_PROPERTIES(PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc/)
ELSE()
    MESSAGE(WARNING "Cannot build documenation, sphinx isn't installed")
ENDIF()