]> SALOME platform Git repositories - tools/solverlab.git/blob - CoreFlows/gui/salome/CMakeLists.txt
Salome HOME
Corrected compilation error. Cannot factor Find(SalomeKernel)
[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 Salome 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 MESSAGE(STATUS "SalomeKERNEL_VERSION is ${SalomeKERNEL_VERSION}")
40
41 # Qt5
42 FIND_PACKAGE(SalomeQt5 REQUIRED COMPONENTS QtCore QtGui)
43
44 IF(SALOME_BUILD_DOC)
45 #  FIND_PACKAGE(SalomeDoxygen)
46 #  FIND_PACKAGE(SalomeSphinx)
47 #  SALOME_LOG_OPTIONAL_PACKAGE(Doxygen SALOME_BUILD_DOC)
48 #  SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC)
49 #  ADD_DEFINITIONS(-DDOXYGEN_IS_OK)
50 ENDIF()
51
52 IF(SALOME_BUILD_TESTS)
53   ENABLE_TESTING()
54 ENDIF()
55
56 # Detection summary:
57 SALOME_PACKAGE_REPORT_AND_CHECK()
58
59 # Directories
60 # ===========
61 SET(SALOME_INSTALL_LIBS "${SALOME_INSTALL_LIBS}" CACHE PATH "Install path: SALOME libs")
62 SET(SALOME_INSTALL_PYTHON "${SALOME_INSTALL_PYTHON}" CACHE PATH 
63     "Install path: SALOME Python scripts")
64 SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH 
65     "Install path: SALOME Python scripts")
66 SET(SALOME_INSTALL_CMAKE_LOCAL ${SALOME_INSTALL_CMAKE_LOCAL} CACHE PATH 
67     "Install path: local SALOME CMake files") 
68 SET(SALOME_INSTALL_RES "${SALOME_INSTALL_RES}" CACHE PATH "Install path: SALOME resources")
69 SET(SALOME_INSTALL_DOC "${SALOME_INSTALL_DOC}" CACHE PATH "Install path: SALOME documentation")
70 SET(SALOME_INSTALL_HEADERS ${SALOME_INSTALL_HEADERS} CACHE PATH "Install path: SALOME headers")
71  
72 # Specific to CoreFlows:   
73 SET(SALOME_CoreFlows_INSTALL_RES_DATA ${SALOME_INSTALL_RES}/solverlab CACHE PATH "Install path: SALOME SOLVERLAB specific resources")
74
75 # Sources 
76 # ========
77 ADD_SUBDIRECTORY(src)
78 ADD_SUBDIRECTORY(resources)
79 IF(SALOME_BUILD_DOC)
80 #   ADD_SUBDIRECTORY(doc)
81 ENDIF()
82