Salome HOME
Merge branch 'BR_H2018_DRAFT' into BR_2018_V8_5
[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   format_sinusx.rst
23   geometrie.rst
24   import.rst
25   importBathy.rst
26   index.rst
27   installationLancementSalome.rst
28   interpolationZ.rst
29   introCloudCompare.rst
30   introQgis.rst
31   lancementCalcul.rst
32   landCoverMap.rst
33   maillage.rst
34   manipsPolys.rst
35   miseEnDonneesTelemac.rst
36   objetsArtificiels.rst
37   objetsNaturels.rst
38   piegesAEviter.rst
39   polylignes.rst
40   preliminaires.rst
41   sinusX_Format.rst
42   streams.rst
43 )
44
45 SET(SPHINXOPTS )
46 SET(SOURCEDIR ${CMAKE_CURRENT_SOURCE_DIR})
47 SET(PAPEROPT_a4 -D latex_paper_size=a4)
48 SET(ALLSPHINXOPTS -d doctrees ${PAPEROPT_a4} ${SPHINXOPTS} ${SOURCEDIR})
49
50 # install user's documentation
51
52 SALOME_CONFIGURE_FILE(conf.py.in conf.py)
53
54 ADD_CUSTOM_TARGET(BUILD_HTML ALL
55   COMMAND ${CMAKE_COMMAND} -E make_directory html 
56   COMMAND ${CMAKE_COMMAND} -E make_directory doctrees
57   COMMAND ${SPHINX_EXECUTABLE} -c ${CMAKE_BINARY_DIR}/doc/salome/tutorial -b html ${ALLSPHINXOPTS} html
58   DEPENDS ${RSTFILES}
59   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
60 )
61  
62 ADD_CUSTOM_TARGET(BUILD_PDF ALL
63   COMMAND ${CMAKE_COMMAND} -E make_directory latex 
64   COMMAND ${SPHINX_EXECUTABLE} -c ${CMAKE_BINARY_DIR}/doc/salome/tutorial -b latex ${ALLSPHINXOPTS} latex
65   COMMAND make -C latex all-pdf
66   DEPENDS ${RSTFILES}
67   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
68 )
69
70 INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ 
71   DESTINATION ${SALOME_INSTALL_DOC}/gui/HYDRO_tutorial
72   PATTERN ".buildinfo" EXCLUDE
73 )
74
75 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/latex/moduleHYDRO_tutoriel.pdf DESTINATION ${SALOME_INSTALL_DOC}/gui/HYDRO_tutorial)
76 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SALOME_Memo.pdf DESTINATION ${SALOME_INSTALL_DOC}/gui/HYDRO_tutorial)
77
78 ADD_SUBDIRECTORY(english)
79