make doc-man working again.

This commit is contained in:
Hefee 2017-12-03 16:52:58 +01:00 committed by Markus Goetz
parent b29e9b931d
commit 1a1ab92ed9
4 changed files with 17 additions and 9 deletions

View file

@ -243,6 +243,7 @@ set(WITH_TESTING ${UNIT_TESTING})
if(BUILD_CLIENT) if(BUILD_CLIENT)
add_subdirectory(src) add_subdirectory(src)
if(NOT BUILD_LIBRARIES_ONLY) if(NOT BUILD_LIBRARIES_ONLY)
add_subdirectory(man)
add_subdirectory(doc) add_subdirectory(doc)
add_subdirectory(doc/dev) add_subdirectory(doc/dev)
if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/admin) if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/admin)

View file

@ -4,7 +4,6 @@ if(SPHINX_FOUND)
set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees") set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
# HTML output directory # HTML output directory
set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html") set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html")
set(SPHINX_MAN_DIR "${CMAKE_CURRENT_BINARY_DIR}/man1")
set(SPHINX_PDF_DIR "${CMAKE_CURRENT_BINARY_DIR}/latex") set(SPHINX_PDF_DIR "${CMAKE_CURRENT_BINARY_DIR}/latex")
set(SPHINX_QCH_DIR "${CMAKE_CURRENT_BINARY_DIR}/qthelp") set(SPHINX_QCH_DIR "${CMAKE_CURRENT_BINARY_DIR}/qthelp")
set(SPHINX_HTMLHELP_DIR "${CMAKE_CURRENT_BINARY_DIR}/htmlhelp") set(SPHINX_HTMLHELP_DIR "${CMAKE_CURRENT_BINARY_DIR}/htmlhelp")
@ -17,8 +16,6 @@ if(SPHINX_FOUND)
install(DIRECTORY ${SPHINX_PDF_DIR} DESTINATION ${APPLICATION_DOC_DIR} OPTIONAL) install(DIRECTORY ${SPHINX_PDF_DIR} DESTINATION ${APPLICATION_DOC_DIR} OPTIONAL)
install(DIRECTORY ${SPHINX_QCH_DIR} DESTINATION ${APPLICATION_DOC_DIR} OPTIONAL) install(DIRECTORY ${SPHINX_QCH_DIR} DESTINATION ${APPLICATION_DOC_DIR} OPTIONAL)
install(DIRECTORY ${SPHINX_MAN_DIR} DESTINATION ${CMAKE_INSTALL_MANDIR} OPTIONAL)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" conf.py @ONLY) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" conf.py @ONLY)
if(WITH_DOC) if(WITH_DOC)
@ -73,11 +70,6 @@ if(SPHINX_FOUND)
-D html_theme=owncloud_com -D html_theme=owncloud_com
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${SPHINX_HTML_DIR}/com ) ${SPHINX_HTML_DIR}/com )
add_custom_target( doc-man ${SPHINX_EXECUTABLE}
-q -c . -b man
-d ${SPHINX_CACHE_DIR}/man
${CMAKE_CURRENT_SOURCE_DIR}
${SPHINX_MAN_DIR} )
## Building CHM files requires HTML Help Workshop. Since it requires wine ## Building CHM files requires HTML Help Workshop. Since it requires wine
## with special dependencies, it's impossible to write a cmake check for it. ## with special dependencies, it's impossible to write a cmake check for it.
@ -92,4 +84,4 @@ if(SPHINX_FOUND)
${SPHINX_HTMLHELP_DIR} ) ${SPHINX_HTMLHELP_DIR} )
add_custom_target( doc-chm pushd ${SPHINX_HTMLHELP_DIR}; ${MSHTML_COMPILER} *.hhp; popd add_custom_target( doc-chm pushd ${SPHINX_HTMLHELP_DIR}; ${MSHTML_COMPILER} *.hhp; popd
DEPENDS doc-chm-sphinx ) DEPENDS doc-chm-sphinx )
endif(SPHINX_FOUND) endif(SPHINX_FOUND)

14
man/CMakeLists.txt Normal file
View file

@ -0,0 +1,14 @@
if(SPHINX_FOUND)
# Sphinx cache with pickled ReST documents
set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
# HTML output directory
set(SPHINX_MAN_DIR "${CMAKE_CURRENT_BINARY_DIR}/man1")
install(DIRECTORY ${SPHINX_MAN_DIR} DESTINATION ${CMAKE_INSTALL_MANDIR} OPTIONAL)
add_custom_target( doc-man ${SPHINX_EXECUTABLE}
-c ${CMAKE_SOURCE_DIR}/doc -b man
-d ${SPHINX_CACHE_DIR}/man
${CMAKE_CURRENT_SOURCE_DIR}
${SPHINX_MAN_DIR} )
endif(SPHINX_FOUND)

1
man/index.rst Normal file
View file

@ -0,0 +1 @@