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 ${CMAKE_COMMAND} -E make_directory tmp
42 COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/geomBuilder.py ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/geomBuilder.py
43 COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/gsketcher.py ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/gsketcher.py
44 COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_tui
45 COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py
46 COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
47 COMMAND ${CMAKE_COMMAND} -E remove_directory tmp
49 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
52 ADD_DEPENDENCIES(usr_docs html_docs)
54 INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target usr_docs)")
55 INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${SALOME_INSTALL_DOC}/gui
56 PATTERN "*usr_docs*" EXCLUDE
57 PATTERN "*CMakeFiles*" EXCLUDE
58 PATTERN "static" EXCLUDE
59 PATTERN "Makefile*" EXCLUDE
60 PATTERN "*.cmake" EXCLUDE
61 PATTERN "doxyfile*" EXCLUDE
62 PATTERN "*.vcproj" EXCLUDE
65 INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/GEOM)
66 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/static/SALOME_BOA_PA.pdf DESTINATION ${SALOME_INSTALL_DOC}/gui/GEOM)