mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 01:42:37 +08:00
intermediate commit
This commit is contained in:
parent
70545e07d8
commit
543e6b9000
@ -222,6 +222,7 @@ endif()
|
||||
add_subdirectory(bindings)
|
||||
add_subdirectory(fdbbackup)
|
||||
add_subdirectory(tests)
|
||||
add_subdirectory(documentation)
|
||||
|
||||
if(WIN32)
|
||||
add_subdirectory(packaging/msi)
|
||||
|
7
cmake/FindSphinx.cmake
Normal file
7
cmake/FindSphinx.cmake
Normal file
@ -0,0 +1,7 @@
|
||||
find_program(SPHINXBUILD
|
||||
sphinx-build
|
||||
DOC "Sphinx-build tool")
|
||||
|
||||
find_package_handle_standard_args(Sphinx
|
||||
FOUND_VAR SPHINX_FOUND
|
||||
REQUIRED_VARS SPHINXBUILD)
|
16
documentation/CMakeLists.txt
Normal file
16
documentation/CMakeLists.txt
Normal file
@ -0,0 +1,16 @@
|
||||
find_package(Sphinx)
|
||||
if(SPHINX_FOUND)
|
||||
set(SPHINX_OPTIONS "" CACHE STRING "Additional Options to pass to sphinx-build")
|
||||
set(SPHINX_PAPER_SIZE "letter" CACHE STRING "Paper size for documents generated with sphinx")
|
||||
set(SPHINX_OPTS "${SPHINX_OPTIONS} -c . -d ${CMAKE_CURRENT_BINARY_DIR}/doctrees -D latex_paper_size=${SPHINX_PAPER_SIZE}")
|
||||
file(GLOB_RECURSE RST_FILES "source/*rst")
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html ${CMAKE_CURRENT_BINARY_DIR}/doctrees)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html
|
||||
COMMAND ${SPHINXBUILD} -b html ${SPHINX_OPTS} ${CMAKE_CURRENT_BINARY_DIR}/html
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/sphinx
|
||||
DEPENDS ${RST_FILES})
|
||||
add_custom_target(html DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)
|
||||
else()
|
||||
message(WARNING "Cound not find sphinx-build - will not build documentatioin")
|
||||
endif()
|
Loading…
x
Reference in New Issue
Block a user