Salome HOME
70b6e918c01ac3b8ac2d685a61a9978106699564
[modules/med.git] / src / CMakeLists.txt
1 # Copyright (C) 2012-2013  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 SET(COMMON_SUBDIRS INTERP_KERNEL MEDCoupling)
21 SET(PARAMEDMEM_SUBDIRS)
22 SET(OLD_COMMON_SUBDIRS)
23
24 # INTERP_KERNELTest, MED, RENUMBER and MEDGUI will go from OLD_COMMON_SUBDIRS -> COMMON_SUBDIRS for Salome7
25
26 IF(SWIG_STATUS)
27   SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDCoupling_Swig)
28 ENDIF(SWIG_STATUS)
29
30 IF(MED_ENABLE_MED3)
31   SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDLoader)
32   SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
33   IF(CPPUNIT_IS_OK)
34     SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS} INTERP_KERNELTest )
35   ENDIF(CPPUNIT_IS_OK)
36   IF(SWIG_STATUS)
37     SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
38   ENDIF(SWIG_STATUS)
39 ENDIF(MED_ENABLE_MED3)
40
41 IF(MPI_IS_OK)
42   SET(PARAMEDMEM_SUBDIRS ${PARAMEDMEM_SUBDIRS} ParaMEDMEM)
43   IF(MED_ENABLE_MED3)
44     SET(PARAMEDMEM_SUBDIRS ${PARAMEDMEM_SUBDIRS} ParaMEDLoader)
45     IF(CPPUNIT_IS_OK)
46       SET(PARAMEDMEM_SUBDIRS ${PARAMEDMEM_SUBDIRS} ParaMEDMEMTest)
47     ENDIF(CPPUNIT_IS_OK)
48     IF(SWIG_STATUS)
49       SET(PARAMEDMEM_SUBDIRS ${PARAMEDMEM_SUBDIRS} ParaMEDMEM_Swig)
50     ENDIF(SWIG_STATUS)
51   ENDIF(MED_ENABLE_MED3)
52 ENDIF(MPI_IS_OK)
53
54 IF(MED_ENABLE_SPLITTER)
55   IF(MED_ENABLE_MED3)
56     SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDPartitioner)
57     SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
58     IF(SWIG_STATUS)
59       SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
60     ENDIF(SWIG_STATUS)
61   ENDIF(MED_ENABLE_MED3)
62 ENDIF(MED_ENABLE_SPLITTER)
63
64 IF(MED_ENABLE_RENUMBER)
65   IF(MED_ENABLE_MED3)
66     SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS} RENUMBER)
67   ENDIF(MED_ENABLE_MED3)
68 ENDIF(MED_ENABLE_RENUMBER)
69
70 IF(MED_ENABLE_KERNEL)
71   SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDCouplingCorba)
72   IF(SWIG_STATUS)
73     SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDCouplingCorba_Swig)
74     SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
75   ENDIF(SWIG_STATUS)
76   SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
77   IF(MPI_IS_OK)
78     SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} ParaMEDCouplingCorba ParaMEDMEMComponent)
79   ENDIF(MPI_IS_OK)
80   IF(MED_ENABLE_MED3)
81     SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDCalculator MEDOP)
82     SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
83   ENDIF(MED_ENABLE_MED3)
84   IF(MED_ENABLE_GUI)
85     SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS} MEDGUI)
86   ENDIF(MED_ENABLE_GUI)
87 ENDIF(MED_ENABLE_KERNEL)
88
89 SET(SUBDIRS ${COMMON_SUBDIRS} ${PARAMEDMEM_SUBDIRS} ${OLD_COMMON_SUBDIRS})
90
91 FOREACH(DIR ${SUBDIRS})
92   ADD_SUBDIRECTORY(${DIR})
93 ENDFOREACH(DIR ${SUBDIRS})