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 SALOME_CONFIGURE_FILE(doxyfile.in doxyfile)
21 SALOME_CONFIGURE_FILE(static/header.html.in static/header.html)
23 ADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE} -u
24 COMMAND ${DOXYGEN_EXECUTABLE}
25 COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''${CMAKE_CURRENT_BINARY_DIR}/doxyfile.bak''')"
26 COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_DOC}/tui/KERNEL''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}/KERNEL''', r'''${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_DOC}/tui/KERNEL'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_DOC}/tui/KERNEL''')"
28 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
32 # - Stop using shutil.rmtree() to clear installation directory - this is not safe
33 # (as the directory can potentically point to custom location)! Moreover, currently, it remove
34 # the documentation generated with Sphinx (from docutils)!
35 # - Redesign dev_docs rule: 'make dev_docs' should generate documentation and 'make install'
36 # should the install it. Other solution: split dev_docs to two steps: dev_docs and install_dev_docs.