Salome HOME
5c1378a084a37750aa4c01e5b3867c5e3cd0f333
[tools/medcoupling.git] / doc / user / CMakeLists.txt
1 # Copyright (C) 2012-2016  CEA/DEN, 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, or (at your option) any later version.
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
20 INCLUDE(UseSphinx)
21
22 SALOME_CONFIGURE_FILE(conf.py.in conf.py)
23
24 IF(MEDCOUPLING_BUILD_FRENCH_DOC)
25   SET(BUILD_LANGUAGE_SWITCHER "true")
26   SALOME_CONFIGURE_FILE(static/switchers.js.in static/switchers.js)
27   ADD_MULTI_LANG_DOCUMENTATION(TARGET_NAME usr_doc MODULE html LANGUAGES fr)
28 ELSE()
29   SET(BUILD_LANGUAGE_SWITCHER "false")
30   SALOME_CONFIGURE_FILE(static/switchers.js.in static/switchers.js)
31   ADD_MULTI_LANG_DOCUMENTATION(TARGET_NAME usr_doc MODULE html)
32 ENDIF()
33
34 #ADD_DEPENDENCIES(usr_doc dev_docs)
35
36 INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target usr_doc)")
37 INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${MEDCOUPLING_INSTALL_DOC}/user)
38 IF(MEDCOUPLING_BUILD_FRENCH_DOC)
39   INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html_fr DESTINATION ${MEDCOUPLING_INSTALL_DOC}/user)
40 ENDIF()
41
42 SET(make_clean_files html html_fr doctrees locale potfiles static)
43 SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${make_clean_files}")