Skip to content

Commit

Permalink
Add missed sphinx cmakelists
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn authored and vigsterkr committed Mar 10, 2016
1 parent 4fe5deb commit 225a98b
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions doc/sphinx/CMakeLists.txt
@@ -0,0 +1,36 @@
#PROJECT(sphinxdoc)
#cmake_minimum_required(VERSION 2.8.8)

set(SPHINX_EXECUTABLE "sphinx-build")

# configured documentation tools and intermediate build results
set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build")

# Sphinx cache with pickled ReST documents
set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")

# HTML output directory
set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html")

configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/source/conf.py"
"${BINARY_BUILD_DIR}/conf.py"
@ONLY)

add_custom_target(shogun_sphinx_doc_extensions
${CMAKE_COMMAND} -E copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/extensions"
"${BINARY_BUILD_DIR}"
COMMENT "Copying Sphinx extensions to ${BINARY_BUILD_DIR}")

add_custom_target(shogun_sphinx_doc ALL
${SPHINX_EXECUTABLE}
-q -b html
-c "${BINARY_BUILD_DIR}"
-d "${SPHINX_CACHE_DIR}"
-D generated_examples_path="${CMAKE_BINARY_DIR}/examples/examples_v2/"
"${CMAKE_CURRENT_SOURCE_DIR}/source"
"${SPHINX_HTML_DIR}"
COMMENT "Building HTML documentation with Sphinx"
DEPENDS shogun_sphinx_doc_extensions shogun_meta_examples)

0 comments on commit 225a98b

Please sign in to comment.