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(guidocdir ${docdir}/gui/GEOM)
30 SALOME_CONFIGURE_FILE(doxyfile.in doxyfile)
31 SALOME_CONFIGURE_FILE(doxyfile_py.in doxyfile_py)
32 SALOME_CONFIGURE_FILE(doxyfile_tui.in doxyfile_tui)
33 SALOME_CONFIGURE_FILE(static/header.html.in ${builddir}/static/header.html)
34 SALOME_CONFIGURE_FILE(static/header_py.html.in ${builddir}/static/header_py.html)
36 SET(f "$ENV{KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py")
38 STRING(REPLACE "/" "\\" f ${f})
41 ADD_CUSTOM_TARGET(usr_docs ${PYTHON_EXECUTABLE} ${f} ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/geomBuilder.py
42 COMMAND ${PYTHON_EXECUTABLE} ${f} ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/gsketcher.py
43 COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_tui
44 COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py
45 COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
46 COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''geomBuilder.py'''); os.remove(r'''gsketcher.py''')"
47 COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM''', ignore=shutil.ignore_patterns('*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*')); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/static/SALOME_BOA_PA.pdf''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM''')"
49 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
52 ADD_DEPENDENCIES(usr_docs html_docs)