Salome HOME
d668ac8c26e2a45153cc75ebc814c103a72f3fb4
[tools/medcoupling.git] / src / MEDCoupling / CMakeLists.txt
1 # Copyright (C) 2012-2016  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 # Author : Anthony Geay (CEA/DEN)
20
21 IF(MEDCOUPLING_BUILD_TESTS)
22   ADD_SUBDIRECTORY(Test)
23 ENDIF(MEDCOUPLING_BUILD_TESTS)
24
25 ### KILLER WARNINGS TO HELP INT64 MANAGEMENT
26 #ADD_DEFINITIONS(-Wextra -Wsynth -Wno-unused-parameter -pedantic -Wall -Wshadow  -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wreturn-type  -Wno-endif-labels  -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wlong-long -Wdisabled-optimization -Wunknown-pragmas -Wundef  -Wreorder)
27
28 INCLUDE_DIRECTORIES(
29   ${CMAKE_CURRENT_BINARY_DIR}/../..
30   ${CMAKE_CURRENT_SOURCE_DIR}
31   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL
32   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases
33   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Geometric2D
34   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/ExprEval
35   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/GaussPoints
36   )
37
38 SET(medcoupling_SOURCES
39   MEDCouplingField.cxx
40   MEDCouplingFieldFloat.cxx
41   MEDCouplingFieldDouble.cxx
42   MEDCouplingFieldInt.cxx
43   MEDCouplingUMesh.cxx
44   MEDCouplingUMesh_internal.cxx
45   MEDCouplingUMesh_intersection.cxx
46   MEDCoupling1GTUMesh.cxx
47   MEDCouplingMemArray.cxx
48   MEDCouplingMemArrayFloat.cxx
49   MEDCouplingMemArrayChar.cxx
50   MEDCouplingMap.cxx
51   MEDCouplingTraits.cxx
52   MEDCouplingTimeLabel.cxx
53   MEDCouplingCMesh.cxx
54   MEDCouplingIMesh.cxx
55   MEDCouplingCurveLinearMesh.cxx
56   MEDCouplingStructuredMesh.cxx
57   MEDCouplingTimeDiscretization.cxx
58   MEDCouplingFieldDiscretization.cxx
59   MEDCouplingRefCountObject.cxx
60   MEDCouplingPointSet.cxx
61   MEDCouplingFieldTemplate.cxx
62   MEDCouplingMappedExtrudedMesh.cxx
63   MEDCouplingMesh.cxx
64   MEDCouplingGaussLocalization.cxx
65   MEDCouplingNatureOfField.cxx
66   MEDCouplingMultiFields.cxx
67   MEDCouplingDefinitionTime.cxx
68   MEDCouplingFieldOverTime.cxx
69   MEDCouplingCartesianAMRMesh.cxx
70   MEDCouplingAMRAttribute.cxx
71   MEDCouplingMatrix.cxx
72   MEDCouplingPartDefinition.cxx
73   MEDCouplingSkyLineArray.cxx
74   MEDCouplingVoronoi.cxx
75   ../ICoCo/ICoCoField.cxx
76   ../ICoCo/ICoCoMEDField.cxx
77   )
78
79 SET(medcouplingremapper_SOURCES
80   MEDCouplingRemapper.cxx
81   )
82
83 ADD_LIBRARY(medcouplingcpp ${medcoupling_SOURCES})
84 SET_TARGET_PROPERTIES(medcouplingcpp PROPERTIES OUTPUT_NAME "medcoupling")
85 TARGET_LINK_LIBRARIES(medcouplingcpp interpkernel)
86 INSTALL(TARGETS medcouplingcpp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${MEDCOUPLING_INSTALL_LIBS})
87
88 ADD_LIBRARY(medcouplingremapper ${medcouplingremapper_SOURCES})
89 TARGET_LINK_LIBRARIES(medcouplingremapper medcouplingcpp)
90 INSTALL(TARGETS medcouplingremapper EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${MEDCOUPLING_INSTALL_LIBS})
91
92 FILE(GLOB medcoupling_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
93 FILE(GLOB medcoupling_HEADERS_TXX "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
94 FILE(GLOB icoco_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/../ICoCo/*.hxx")
95 INSTALL(FILES ${medcoupling_HEADERS_HXX} ${medcoupling_HEADERS_TXX} ${icoco_HEADERS_HXX} MEDCouplingNatureOfFieldEnum DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})
96
97 # To allow usage as SWIG dependencies:
98 SET(medcoupling_HEADERS_HXX PARENT_SCOPE)
99 SET(medcoupling_HEADERS_TXX PARENT_SCOPE)