Salome HOME
restructuration tutoriel, suite
[modules/hydro.git] / doc / salome / tutorial / CMakeLists.txt
1 #  Copyright (C) 2012-2013 EDF
2 #
3 #  This file is part of SALOME HYDRO module.
4 #
5 #  SALOME HYDRO module is free software: you can redistribute it and/or modify
6 #  it under the terms of the GNU General Public License as published by
7 #  the Free Software Foundation, either version 3 of the License, or
8 #  (at your option) any later version.
9 #
10 #  SALOME HYDRO module is distributed in the hope that it will be useful,
11 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 #  GNU General Public License for more details.
14 #
15 #  You should have received a copy of the GNU General Public License
16 #  along with SALOME HYDRO module.  If not, see <http://www.gnu.org/licenses/>.
17
18 SET(RSTFILES
19   casCalcul.rst
20   depouillementCalcul.rst
21   donneesPrealables.rst
22   geometrie.rst
23   import.rst
24   importBathy.rst
25   index.rst
26   installationLancementSalome.rst
27   interpolationZ.rst
28   lancementCalcul.rst
29   maillage.rst
30   miseEnDonneesTelemac.rst
31   objetsArtificiels.rst
32   objetsNaturels.rst
33   piegesAEviter.rst
34   polylignes.rst
35   preliminaires.rst
36   streams.rst
37 )
38
39 SET(SPHINXOPTS )
40 SET(SOURCEDIR ${CMAKE_CURRENT_SOURCE_DIR})
41 SET(PAPEROPT_a4 -D latex_paper_size=a4)
42 SET(ALLSPHINXOPTS -d doctrees ${PAPEROPT_a4} ${SPHINXOPTS} ${SOURCEDIR})
43
44 # install user's documentation
45
46 SALOME_CONFIGURE_FILE(conf.py.in conf.py)
47
48 SET(HTML_ROOT_FILE html/index.html)
49
50 ADD_CUSTOM_COMMAND(OUTPUT ${HTML_ROOT_FILE} 
51   COMMAND ${CMAKE_COMMAND} -E make_directory html 
52   COMMAND ${CMAKE_COMMAND} -E make_directory doctrees
53   COMMAND ${SPHINX_EXECUTABLE} -c ${CMAKE_BINARY_DIR}/doc/salome/tutorial -b html ${ALLSPHINXOPTS} html
54   DEPENDS ${RSTFILES}
55   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
56 )
57
58 ADD_CUSTOM_TARGET(BUILD_HTML ALL DEPENDS ${HTML_ROOT_FILE})
59
60 INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ 
61   DESTINATION ${SALOME_INSTALL_DOC}/gui/HYDRO_tutorial
62   PATTERN ".buildinfo" EXCLUDE
63 )