Commit 5bdc44f8 authored by Jørgen Lind's avatar Jørgen Lind
Browse files

Install docs into correct folder

parent a9999a25
......@@ -40,7 +40,7 @@ option(ENABLE_OPENMP "Enable the OpenMP codepath" ON)
option(BUILD_SHARED_LIBS "Build OpenVDS as a shared library" ON)
option(BUILD_EXAMPLES "Build OpenVDS example projects" ON)
option(BUILD_TESTS "Build OpenVDS tests" ON)
option(BUILD_DOCS "Build OpenVDS docs" ON)
option(BUILD_DOCS "Build OpenVDS docs" OFF)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)
......
......@@ -57,6 +57,7 @@ Then start like other cmake projects in Visual Studio
#### Build options
- BUILD_PYTHON (ON|OFF)
- BUILD_DOCS (ON|OFF) Default to OFF
- ENABLE_OPENMP (ON|OFF)
- BUILD_ZLIB (ON|OFF)
- CMAKE_INSTALL_PREFIX (PATH)
......@@ -64,3 +65,14 @@ Then start like other cmake projects in Visual Studio
Build options are arguments to cmake. `$ cmake -DBUILD_PYTHON=OFF ..` would turn off building python.
#### Building documentation
The following tools are needed to build the documentation:
- Doxygen
- Sphinx
- Breath
On Windows download the Doxygen binary from: http://doxygen.nl/download.html
Then install Sphinx and Breath with pip:
C:\> pip install -U sphinx breathe
Add the -DBUILD_DOCS=ON to the cmake argument list
......@@ -41,7 +41,7 @@ doxygen_add_docs(Doxygen
#add_custom_target(Doxygen DEPENDS ${DOXYGEN_INDEX_FILE})
set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR})
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/sphinx)
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/html)
set(SPHINX_INDEX_FILE ${SPHINX_BUILD}/index.html)
# Only regenerate Sphinx when:
......@@ -62,10 +62,8 @@ add_custom_command(OUTPUT ${SPHINX_INDEX_FILE}
COMMENT "Generating documentation with Sphinx")
# Nice named target so we can run the job easily
add_custom_target(Sphinx DEPENDS ${SPHINX_INDEX_FILE})
add_custom_target(Sphinx ALL DEPENDS ${SPHINX_INDEX_FILE})
add_dependencies(Sphinx Doxygen)
# Add an install target to install the docs
include(GNUInstallDirs)
install(DIRECTORY ${SPHINX_BUILD}
DESTINATION ${CMAKE_INSTALL_DOCDIR})
install(DIRECTORY ${SPHINX_BUILD} DESTINATION ${CMAKE_INSTALL_DOCDIR})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment