From 1f185bfb4700f0ce8eb58e3d4f9e178412a0088e Mon Sep 17 00:00:00 2001
From: florent <florent@laas.fr>
Date: Tue, 23 Nov 2010 18:21:02 +0100
Subject: [PATCH] Use submodule cmake to generate python documentation

---
 doc/CMakeLists.txt | 25 +++----------------------
 1 file changed, 3 insertions(+), 22 deletions(-)

diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index c123489..b3afbcb 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -3,26 +3,7 @@
 #  Author: Florent Lamiraux
 #
 
-CONFIG_FILES_CMAKE(
-  sphinx/index.rst
-  sphinx/conf.py
-  )
+INCLUDE(../cmake/sphinx.cmake)
 
-ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html
-  COMMAND ${SPHINX_EXECUTABLE} -b html \"${CMAKE_CURRENT_BINARY_DIR}/sphinx\" \"${CMAKE_CURRENT_BINARY_DIR}/sphinx-html\"
-)
-
-ADD_CUSTOM_TARGET(documentation ALL
-  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)
-
-#
-# Install html documentation
-#
-
-# html files
-INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/sphinx-html
-  DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME})
-
-# pictures
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pictures
-  DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME})
+SPHINX_SETUP_PROJECT_DOCUMENTATION()
+SPHINX_SETUP_PROJECT_DOCUMENTATION_FINALIZE()
-- 
GitLab