CMakeLists.txt 706 Bytes
Newer Older
1
2
3
4
#
#  Copyright 2010 CNRS
#  Author: Florent Lamiraux
#
florent's avatar
florent committed
5

6
7
8
9
CONFIG_FILES_CMAKE(
  sphinx/index.rst
  sphinx/conf.py
  )
florent's avatar
florent committed
10
11

ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html
12
  COMMAND ${SPHINX_EXECUTABLE} -b html \"${CMAKE_CURRENT_BINARY_DIR}/sphinx\" \"${CMAKE_CURRENT_BINARY_DIR}/sphinx-html\"
florent's avatar
florent committed
13
14
15
16
17
18
19
20
21
22
)

ADD_CUSTOM_TARGET(documentation ALL
  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)

#
# Install html documentation
#

# html files
23
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/sphinx-html
florent's avatar
florent committed
24
25
26
27
  DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME})

# pictures
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pictures
28
  DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME})