]> SALOME platform Git repositories - tools/ydefx.git/blob - CMakeLists.txt
Salome HOME
Add licence.
[tools/ydefx.git] / CMakeLists.txt
1 # Copyright (C) 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, 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.6)
20 PROJECT(idefix)
21
22 SET (CMAKE_CXX_STANDARD 11)
23 ENABLE_TESTING()
24 SET(BUILD_SHARED_LIBS TRUE)
25
26 SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
27 IF(EXISTS ${CONFIGURATION_ROOT_DIR})
28   LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
29   INCLUDE(SalomeMacros)
30 ELSE()
31   MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !"
32 )
33 ENDIF()
34
35 SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to Salome KERNEL")
36 IF( EXISTS ${KERNEL_ROOT_DIR} )
37   LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files")
38 ELSE()
39   MESSAGE(FATAL_ERROR "We absolutely need Salome KERNEL, please define KERNEL_ROOT_DIR")
40 ENDIF()
41 FIND_PACKAGE(SalomeKERNEL REQUIRED)
42 ADD_DEFINITIONS(${KERNEL_DEFINITIONS} )
43 INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS})
44
45 SET(YACS_ROOT_DIR $ENV{YACS_ROOT_DIR} CACHE PATH "Path to Salome YACS")
46 IF( EXISTS ${YACS_ROOT_DIR} )
47   LIST(APPEND CMAKE_MODULE_PATH "${YACS_ROOT_DIR}/salome_adm/cmake_files")
48 ELSE()
49   MESSAGE(FATAL_ERROR "We absolutely need Salome YACS, please define YACS_ROOT_DIR")
50 ENDIF()
51 FIND_PACKAGE(SalomeYACS REQUIRED)
52 ADD_DEFINITIONS(${YACS_DEFINITIONS})
53 INCLUDE_DIRECTORIES(${YACS_INCLUDE_DIRS})
54
55 SET(PY2CPP_ROOT_DIR $ENV{PY2CPP_ROOT_DIR} CACHE PATH "Path to py2cpp")
56 IF( EXISTS ${PY2CPP_ROOT_DIR} )
57   LIST(APPEND CMAKE_MODULE_PATH "${PY2CPP_ROOT_DIR}/lib/cmake/py2cpp")
58 ELSE()
59   MESSAGE(FATAL_ERROR "We absolutely need py2cpp, please define PY2CPP_ROOT_DIR")
60 ENDIF()
61 FIND_PACKAGE(Py2cpp REQUIRED)
62
63 SET(SALOME_INSTALL_PYTHON "${SALOME_INSTALL_PYTHON}" CACHE PATH "Install Python files")
64
65 ADD_SUBDIRECTORY(src)