Salome HOME
LOT7: fix compilation at med_int==int64
[modules/paravis.git] / src / Plugins / DevelopedSurface / CMakeLists.txt
1 # Copyright (C) 2017-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 # Author : Anthony Geay (EDF R&D)
20
21 PROJECT(DevelopedSurface)
22 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
23
24 CMAKE_POLICY(SET CMP0003 NEW)
25 IF(${CMAKE_VERSION} VERSION_GREATER "3.0.0")
26   CMAKE_POLICY(SET CMP0022 OLD)
27   CMAKE_POLICY(SET CMP0023 OLD)
28 ENDIF()
29
30
31 ENABLE_TESTING()
32
33 # Common CMake macros
34 # ===================
35 SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
36 IF(EXISTS ${CONFIGURATION_ROOT_DIR})
37   LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
38   INCLUDE(SalomeMacros)
39 ELSE()
40     MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
41 ENDIF()
42 FIND_PACKAGE(SalomePythonInterp REQUIRED)
43 FIND_PACKAGE(SalomePythonLibs REQUIRED)
44 FIND_PACKAGE(SalomeMEDFile REQUIRED)
45
46 FIND_PACKAGE(ParaView REQUIRED)
47 IF(NOT ParaView_FOUND)
48   MESSAGE(FATAL_ERROR "Please locate ParaView." )
49 ENDIF(NOT ParaView_FOUND)
50 INCLUDE(${PARAVIEW_USE_FILE})
51
52 SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "MEDCOUPLING_ROOT_DIR")
53 LIST(APPEND CMAKE_MODULE_PATH "${MEDCOUPLING_ROOT_DIR}/cmake_files")
54
55 ##
56 FIND_PACKAGE(SalomeMEDCoupling REQUIRED)
57
58 IF(MEDCOUPLING_USE_64BIT_IDS)
59   ADD_DEFINITIONS("-DMEDCOUPLING_USE_64BIT_IDS")
60 ENDIF(MEDCOUPLING_USE_64BIT_IDS)
61
62
63 OPTION(BUILD_SHARED_LIBS "Build with shared libraries." ${VTK_BUILD_SHARED_LIBS})
64
65 SET(VTK_INSTALL_RUNTIME_DIR lib)
66 SET(VTK_INSTALL_LIBRARY_DIR lib)
67 SET(VTK_INSTALL_ARCHIVE_DIR lib)
68
69 PV_PROCESS_MODULES()
70 INCLUDE_DIRECTORIES( ${MEDCOUPLING_INCLUDE_DIRS} ${MEDFILE_INCLUDE_DIRS})
71 INCLUDE_DIRECTORIES( "${PROJECT_SOURCE_DIR}/../MEDWriter/IO" )
72 #INCLUDE_DIRECTORIES( "${PARAVIS_ROOT_DIR}/include/salome" )
73 ADD_SUBDIRECTORY(ParaViewPlugin)
74
75
76 ADD_SUBDIRECTORY(Test)