]> SALOME platform Git repositories - modules/yacs.git/blob - doc/CMakeLists.txt
Salome HOME
Introduction of CMake build procedure for YACS module.
[modules/yacs.git] / doc / CMakeLists.txt
1 # Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
21
22 SET(top_builddir ${CMAKE_BINARY_DIR})
23 SET(top_srcdir ${CMAKE_SOURCE_DIR})
24 SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR})
25 SET(builddir ${CMAKE_CURRENT_BINARY_DIR})
26 SET(datadir ${CMAKE_INSTALL_PREFIX}/share)
27 SET(docdir ${datadir}/doc/salome)
28 SET(yacsdocdir ${docdir}/gui/YACS)
29 SET(yacsdevdocdir ${docdir}/tui/YACS)
30
31 SET(RSTFILES
32   accesCorba.rst
33   accesLocal.rst
34   advancepy.rst
35   annexe_common.rst
36   batch.rst
37   calcium.rst
38   calciumyacs.rst
39   calciumapi.rst
40   calciummod.rst
41   calculator.rst
42   compInterne.rst
43   components.rst
44   console.rst
45   cppsalome.rst
46   dataflow.rst
47   etapes.rst
48   execpy.rst
49   execution.rst
50   execxml.rst
51   gui_components.rst
52   gui.rst
53   hxx2salome.rst
54   index.rst
55   integration.rst
56   using.rst
57   main_menu.rst
58   modification.rst
59   operations.rst
60   principes.rst
61   progdsc.rst
62   pysalome.rst
63   python.rst
64   rappels.rst
65   references.rst
66   representation.rst
67   salome.rst
68   schemapy.rst
69   schemaxml.rst
70   scratch.rst
71   toolbars.rst
72   optimizer.rst
73   yacsgen.rst
74   )
75
76 SET(SPHINXOPTS )
77 SET(SOURCEDIR ${srcdir})
78 SET(PAPEROPT_a4 -D latex_paper_size=a4)
79 SET(ALLSPHINXOPTS -d doctrees ${PAPEROPT_a4} ${SPHINXOPTS} ${SOURCEDIR})
80
81 SALOME_CONFIGURE_FILE(Doxyfile.in Doxyfile)
82 SALOME_CONFIGURE_FILE(conf.py.in conf.py)
83 SALOME_CONFIGURE_FILE(sources/header.html.in sources/header.html)
84
85 # install user's documentation
86 ADD_CUSTOM_TARGET(htm 
87   COMMAND mkdir -p html doctrees
88   COMMAND ${SPHINX_EXECUTABLE} -c ${top_builddir}/doc -b html ${ALLSPHINXOPTS} html
89   DEPENDS ${RSTFILES}
90   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
91   )
92 INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target htm)")
93 INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ 
94   DESTINATION ${yacsdocdir} 
95   USE_SOURCE_PERMISSIONS
96   PATTERN ".buildinfo" EXCLUDE
97   )
98
99 # install developer's documentation
100 ADD_CUSTOM_TARGET(dev_docs
101   COMMAND ${DOXYGEN_EXECUTABLE} -u
102   COMMAND ${DOXYGEN_EXECUTABLE}
103   COMMAND mkdir -p ${yacsdevdocdir}
104   COMMAND cp -fv ${srcdir}/images/head.png ${yacsdevdocdir}/head.png
105   COMMAND find "${builddir}/htmldev" -name \"*.*\" -exec cp -rfv {} ${yacsdevdocdir} '\;'
106   COMMAND cp -rfv ${top_srcdir}/src/yacsloader/samples ${yacsdevdocdir}
107   COMMAND rm -rf ${yacsdevdocdir}/samples/CVS
108   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
109   )