Salome HOME
6788e57dd854e625dd1a3936ca9074436dc39363
[tools/documentation.git] / CMakeLists.txt
1 # Copyright (C) 2012-2019  CEA/DEN, EDF R&D, OPEN CASCADE
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 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
20 INCLUDE(CMakeDependentOption)
21
22 PROJECT(SalomeDOCUMENTATION)
23
24 # Versioning
25 # ========
26 # Project name, upper case
27 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
28
29 SET(${PROJECT_NAME_UC}_MAJOR_VERSION 9)
30 SET(${PROJECT_NAME_UC}_MINOR_VERSION 3)
31 SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
32 SET(${PROJECT_NAME_UC}_VERSION
33   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
34 SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
35
36 # Common CMake macros
37 # ===================
38 SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
39 IF(EXISTS ${CONFIGURATION_ROOT_DIR})
40   LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
41   INCLUDE(SalomeMacros)
42 ELSE()
43   MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
44 ENDIF()
45
46 INCLUDE(SalomeSetupPlatform)
47 INCLUDE(SalomeMacros)
48
49 # Find prerequisites needed to documentation generation
50 # ==================================================
51 FIND_PACKAGE(SalomePythonInterp)
52 FIND_PACKAGE(SalomePythonLibs)
53 FIND_PACKAGE(SalomeDoxygen)
54 FIND_PACKAGE(SalomeGraphviz)
55 FIND_PACKAGE(SalomeSphinx)
56
57 # Directories
58 # =========
59 SET(SALOME_INSTALL_DOC_GUI   gui   CACHE PATH "Install path: user documentation")
60 SET(SALOME_INSTALL_DOC_TUI   tui   CACHE PATH "Install path: developer documentation")
61 SET(SALOME_INSTALL_DOC_DEV   dev   CACHE PATH "Install path: additional developer documentation")
62 SET(SALOME_INSTALL_DOC_EXTRA extra CACHE PATH "Install path: extra documentation")
63
64 MARK_AS_ADVANCED(
65  SALOME_INSTALL_DOC_GUI 
66  SALOME_INSTALL_DOC_TUI
67  SALOME_INSTALL_DOC_DEV
68  SALOME_INSTALL_DOC_EXTRA
69 )
70
71 # Sources 
72 # =====
73 ADD_SUBDIRECTORY(tui)
74 ADD_SUBDIRECTORY(gui)
75 ADD_SUBDIRECTORY(extra)
76 ADD_SUBDIRECTORY(dev)
77
78 # Install rules
79 # ==========
80 FILE(GLOB COMMON_HTML_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.html")
81 FILE(GLOB COMMON_PNG_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
82
83 INSTALL(FILES ${COMMON_HTML_FILES} ${COMMON_PNG_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX})