]> SALOME platform Git repositories - tools/medcoupling.git/blob - src/MEDSPLITTER/CMakeLists.txt
Salome HOME
Merge from V6_main_20120808 08Aug12
[tools/medcoupling.git] / src / MEDSPLITTER / CMakeLists.txt
1 # Copyright (C) 2007-2012  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.
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 ADD_SUBDIRECTORY(Test)
21
22 INCLUDE_DIRECTORIES(
23   ${PARMETIS_INCLUDE_DIRS}
24   ${METIS_INCLUDE_DIRS}
25   ${SCOTCH_INCLUDE_DIRS}
26   ${BOOST_INCLUDE_DIRS}
27   ${METIS_INCLUDE_DIRS}
28   ${LIBXML_INCLUDE_DIRS}
29   ${MED3_INCLUDE_DIRS}
30   ${HDF5_INCLUDE_DIRS}
31   ${MPI_INCLUDE_DIRS}
32   ${CMAKE_CURRENT_SOURCE_DIR}/../MEDMEM
33   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL
34   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases
35   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Geometric2D
36   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/ExprEval
37   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/GaussPoints
38   )
39
40 SET(medsplittercpp_HEADERS_HXX
41   MEDSPLITTER_Topology.hxx
42   MEDSPLITTER_MESHCollection.hxx
43   MEDSPLITTER_MESHCollection.H
44   MEDSPLITTER_MESHCollectionDriver.H
45   MEDSPLITTER_MESHCollectionMedXMLDriver.H
46   MEDSPLITTER_MESHCollectionMedAsciiDriver.H
47   MEDSPLITTER_MESHCollectionDriver.hxx
48   MEDSPLITTER_MESHCollectionMedXMLDriver.hxx
49   MEDSPLITTER_MESHCollectionMedAsciiDriver.hxx
50   MEDSPLITTER_ParallelTopology.hxx
51   MEDSPLITTER_FaceModel.hxx
52   MEDSPLITTER_Graph.hxx
53   MEDSPLITTER_UserGraph.hxx
54   MEDSPLITTER_API.hxx
55   MEDSPLITTER_SequentialTopology.hxx
56   MEDSPLITTER_utils.hxx
57   MEDSPLITTER.hxx
58   MEDSPLITTER_ParaDomainSelector.hxx
59   MEDSPLITTER_MeshSendReceive.hxx
60   MEDSPLITTER_JointExchangeData.hxx
61   )
62
63 SET(medsplittercpp_SOURCES
64   MEDSPLITTER_MESHCollection.cxx
65   MEDSPLITTER_MESHCollectionDriver.cxx
66   MEDSPLITTER_MESHCollectionMedXMLDriver.cxx
67   MEDSPLITTER_MESHCollectionMedAsciiDriver.cxx
68   MEDSPLITTER_ParallelTopology.cxx
69   MEDSPLITTER_Graph.cxx
70   MEDSPLITTER_UserGraph.cxx
71   MEDSPLITTER_API.cxx
72   MEDSPLITTER_ParaDomainSelector.cxx
73   MEDSPLITTER_MeshSendReceive.cxx
74   MEDSPLITTER_JointExchangeData.cxx
75   )
76
77 SET(medsplittercpp_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS} ${LIBXML_DEFINITIONS}")
78 SET(medsplittercpp_LDFLAGS medmem ${LIBXML_LIBS})
79
80 IF(MED_ENABLE_SCOTCH)
81   SET(medsplittercpp_SOURCES ${medsplittercpp_SOURCES} MEDSPLITTER_SCOTCHGraph.cxx)
82   SET(medsplittercpp_HEADERS_HXX ${medsplittercpp_HEADERS_HXX} MEDSPLITTER_SCOTCHGraph.hxx)
83   SET(medsplittercpp_DEFINITIONS "${medsplittercpp_DEFINITIONS} ${SCOTCH_DEFINITIONS}")
84   SET(medsplittercpp_LDFLAGS ${medsplittercpp_LDFLAGS} ${SCOTCH_LIBS})
85 ENDIF(MED_ENABLE_SCOTCH)
86
87 IF(MPI_IS_OK)
88   IF(MED_ENABLE_PARMETIS)
89     SET(medsplittercpp_SOURCES ${medsplittercpp_SOURCES} MEDSPLITTER_METISGraph.cxx)
90     SET(medsplittercpp_HEADERS_HXX ${medsplittercpp_HEADERS_HXX} MEDSPLITTER_METISGraph.hxx)
91     SET(medsplittercpp_DEFINITIONS "${medsplittercpp_DEFINITIONS} ${MPI_DEFINITIONS} ${PARMETIS_DEFINITIONS}")
92     SET(medsplittercpp_LDFLAGS ${medsplittercpp_LDFLAGS} ${PARMETIS_LIBS} ${MPI_LIBS})
93   ENDIF(MED_ENABLE_PARMETIS)
94 ELSE(MPI_IS_OK)
95   IF(MED_ENABLE_METIS)
96     SET(medsplittercpp_SOURCES ${medsplittercpp_SOURCES} MEDSPLITTER_METISGraph.cxx)
97     SET(medsplittercpp_HEADERS_HXX ${medsplittercpp_HEADERS_HXX} MEDSPLITTER_METISGraph.hxx)
98     SET(medsplittercpp_DEFINITIONS "${medsplittercpp_DEFINITIONS} ${METIS_DEFINITIONS}")
99     SET(medsplittercpp_LDFLAGS ${medsplittercpp_LDFLAGS} ${METIS_LIBS})
100   ENDIF(MED_ENABLE_METIS)
101 ENDIF(MPI_IS_OK)
102
103
104 IF(MPI_IS_OK)
105   ADD_EXECUTABLE(medsplitter_para medsplitter_para.cxx)
106   SET_TARGET_PROPERTIES(medsplitter_para PROPERTIES COMPILE_FLAGS "${medsplittercpp_DEFINITIONS}")
107   TARGET_LINK_LIBRARIES(medsplitter_para medsplittercpp)
108   INSTALL(TARGETS medsplitter_para DESTINATION ${MED_salomebin_BINS})
109 ELSE(MPI_IS_OK)
110   ADD_EXECUTABLE(medsplitter medsplitter.cxx)
111   SET_TARGET_PROPERTIES(medsplitter PROPERTIES COMPILE_FLAGS "${medsplittercpp_DEFINITIONS}")
112   TARGET_LINK_LIBRARIES(medsplitter medsplittercpp)
113   INSTALL(TARGETS medsplitter DESTINATION ${MED_salomebin_BINS})
114 ENDIF(MPI_IS_OK)
115
116 ADD_LIBRARY(medsplittercpp SHARED ${medsplittercpp_SOURCES})
117 SET_TARGET_PROPERTIES(medsplittercpp PROPERTIES COMPILE_FLAGS "${medsplittercpp_DEFINITIONS}")
118 TARGET_LINK_LIBRARIES(medsplittercpp ${medsplittercpp_LDFLAGS})
119 INSTALL(TARGETS medsplittercpp DESTINATION ${MED_salomelib_LIBS})
120
121 INSTALL(FILES ${medsplittercpp_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})