1 # Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
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)
77 SET(SOURCEDIR ${srcdir})
78 SET(PAPEROPT_a4 -D latex_paper_size=a4)
79 SET(ALLSPHINXOPTS -d doctrees ${PAPEROPT_a4} ${SPHINXOPTS} ${SOURCEDIR})
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)
85 # install user's documentation
87 COMMAND mkdir -p html doctrees
88 COMMAND ${SPHINX_EXECUTABLE} -c ${top_builddir}/doc -b html ${ALLSPHINXOPTS} html
90 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
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
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}