Salome HOME
CMake implementation pour split d install pour branchement a l IHM
[modules/adao.git] / doc / fr / CMakeLists.txt
1 # Copyright (C) 2008-2019 EDF R&D
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 # Author: Anthony Geay, anthony.geay@edf.fr, EDF R&D
20
21 set(DOCLANG fr)
22 set(DOC_DESTINATION "share/doc/salome/gui/ADAO/${DOCLANG}")
23
24 file(GLOB_RECURSE BEAUTIFUL_PNGS "${CMAKE_SOURCE_DIR}/doc/${DOCLANG}/*.png")
25 install(FILES ${BEAUTIFUL_PNGS} DESTINATION ${ADAO_RES})
26 file(COPY conf.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
27 file(COPY ${CMAKE_SOURCE_DIR}/bin/module_version.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
28 file(GLOB_RECURSE RST_FILES "${CMAKE_SOURCE_DIR}/doc/${DOCLANG}/*.rst")
29 file(COPY ${RST_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
30 file(COPY resources snippets images DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
31
32 set(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_BINARY_DIR} html)
33 SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}")      
34
35 add_custom_target(fr_tutorial_doc COMMAND ${_cmd})
36 install(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target fr_tutorial_doc)")
37
38 file(GLOB_RECURSE BEAUTIFUL_PNGS2 "${CMAKE_SOURCE_DIR}/doc/${DOCLANG}/images/*.png")
39 INSTALL(CODE "file(GLOB BEAUTIFUL_HTML \"${CMAKE_CURRENT_BINARY_DIR}/html/*.html\")
40 file(COPY \${BEAUTIFUL_HTML} DESTINATION ${CMAKE_INSTALL_PREFIX}/${DOC_DESTINATION})")
41 install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/_static" DESTINATION ${DOC_DESTINATION})
42 install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/snippets" DESTINATION ${DOC_DESTINATION})
43 install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/_sources" DESTINATION ${DOC_DESTINATION})
44 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/html/searchindex.js" DESTINATION ${DOC_DESTINATION})
45 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/html/objects.inv" DESTINATION ${DOC_DESTINATION})
46 install(FILES ${BEAUTIFUL_PNGS2} DESTINATION ${DOC_DESTINATION}/_images)