]> SALOME platform Git repositories - tools/solverlab.git/blob - CoreFlows/gui/salome/CMakeLists.txt
Salome HOME
Kernel version is not 7.8.0
[tools/solverlab.git] / CoreFlows / gui / salome / CMakeLists.txt
1 # Copyright (C) 2012-2014  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 # Common CMake macros
21 # ===================
22 SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
23 IF(EXISTS ${CONFIGURATION_ROOT_DIR})
24   LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
25   INCLUDE(SalomeMacros NO_POLICY_SCOPE)
26 ELSE()
27   MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
28 ENDIF()
29
30 # Find KERNEL 
31 # ==============
32 SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
33 IF( EXISTS ${KERNEL_ROOT_DIR} )
34   FIND_PACKAGE(SalomeKERNEL REQUIRED)
35 ELSE( EXISTS ${KERNEL_ROOT_DIR} )
36   MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR!")
37 ENDIF( EXISTS ${KERNEL_ROOT_DIR} )
38
39 # Find SALOME GUI 
40 # ==============
41 SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI")
42 IF(EXISTS ${GUI_ROOT_DIR})
43   FIND_PACKAGE(SalomeGUI)
44 ELSE(EXISTS ${GUI_ROOT_DIR})
45   MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR!")
46 ENDIF(EXISTS ${GUI_ROOT_DIR})
47
48 # Platform setup
49 # ==============
50 INCLUDE(SalomeSetupPlatform)   # From KERNEL
51     
52 # Prerequisites
53 # =============
54
55 # Mandatory products
56  FIND_PACKAGE(SalomePythonInterp REQUIRED)
57  FIND_PACKAGE(SalomePythonLibs REQUIRED)
58
59 MESSAGE(STATUS "SalomeKERNEL_VERSION is ${SalomeKERNEL_VERSION}")
60
61 # Qt5
62 FIND_PACKAGE(SalomeQt5 REQUIRED COMPONENTS QtCore QtGui)
63
64 IF(SALOME_BUILD_DOC)
65 #  FIND_PACKAGE(SalomeDoxygen)
66 #  FIND_PACKAGE(SalomeSphinx)
67 #  SALOME_LOG_OPTIONAL_PACKAGE(Doxygen SALOME_BUILD_DOC)
68 #  SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC)
69 #  ADD_DEFINITIONS(-DDOXYGEN_IS_OK)
70 ENDIF()
71
72 IF(SALOME_BUILD_TESTS)
73   ENABLE_TESTING()
74 ENDIF()
75
76 # Detection summary:
77 SALOME_PACKAGE_REPORT_AND_CHECK()
78
79 # Directories
80 # ===========
81 SET(SALOME_INSTALL_LIBS "${SALOME_INSTALL_LIBS}" CACHE PATH "Install path: SALOME libs")
82 SET(SALOME_INSTALL_PYTHON "${SALOME_INSTALL_PYTHON}" CACHE PATH 
83     "Install path: SALOME Python scripts")
84 SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH 
85     "Install path: SALOME Python scripts")
86 SET(SALOME_INSTALL_CMAKE_LOCAL ${SALOME_INSTALL_CMAKE_LOCAL} CACHE PATH 
87     "Install path: local SALOME CMake files") 
88 SET(SALOME_INSTALL_RES "${SALOME_INSTALL_RES}" CACHE PATH "Install path: SALOME resources")
89 SET(SALOME_INSTALL_DOC "${SALOME_INSTALL_DOC}" CACHE PATH "Install path: SALOME documentation")
90 SET(SALOME_INSTALL_HEADERS ${SALOME_INSTALL_HEADERS} CACHE PATH "Install path: SALOME headers")
91  
92 # Specific to CoreFlows:   
93 SET(SALOME_CoreFlows_INSTALL_RES_DATA ${SALOME_INSTALL_RES}/solverlab CACHE PATH "Install path: SALOME SOLVERLAB specific resources")
94
95 # Sources 
96 # ========
97 ADD_SUBDIRECTORY(src)
98 ADD_SUBDIRECTORY(resources)
99 IF(SALOME_BUILD_DOC)
100 #   ADD_SUBDIRECTORY(doc)
101 ENDIF()
102