Salome HOME
Clearly identify when we execute Python code from SALOME embedded console.
[modules/paravis.git] / src / Plugins / MEDReader / ParaViewPlugin / CMakeLists.txt
1 # Copyright (C) 2010-2014  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
20 INCLUDE_DIRECTORIES(
21   ${MEDReader_SOURCE_DIR}/IO
22   ${MEDReader_BINARY_DIR}/IO )
23
24 IF(PARAVIEW_BUILD_QT_GUI)
25
26   QT4_WRAP_UI(CLIENT_UI_SRCS Resources/UI/MEDReaderPanel.ui Resources/UI/ExtractGroupPanel.ui Resources/UI/ExtractCellTypePanel.ui)
27   
28   # create a plugin that implements an object panel for the reader
29   SET(CLIENT_SRCS pqMEDReaderPanel.cxx pqExtractGroupPanel.cxx pqExtractCellTypePanel.cxx VectBoolSpreadSheet.cxx VectBoolWidget.cxx)
30   
31   QT4_WRAP_CPP(MOC_SRCS pqMEDReaderPanel.h pqExtractGroupPanel.h pqExtractCellTypePanel.h VectBoolSpreadSheet.h VectBoolWidget.h)
32   
33   ADD_PARAVIEW_OBJECT_PANEL(MEDREADER_IFACES MEDREADER_IFACE_SRCS
34     CLASS_NAME pqMEDReaderPanel
35     XML_NAME MEDReader
36     XML_GROUP sources
37     )
38   
39   ADD_PARAVIEW_OBJECT_PANEL(EXTRACTGROUP_IFACES EXTRACTGROUP_IFACE_SRCS
40     CLASS_NAME pqExtractGroupPanel
41     XML_NAME ExtractGroup
42     XML_GROUP filters
43     )
44
45   ADD_PARAVIEW_OBJECT_PANEL(EXTRACTCELLTYPE_IFACES EXTRACTCELLTYPE_IFACE_SRCS
46     CLASS_NAME pqExtractCellTypePanel
47     XML_NAME ExtractCellType
48     XML_GROUP filters
49     )
50   
51   # create the med reader plugin itself
52   ADD_PARAVIEW_PLUGIN(MEDReaderPlugin "4.0"
53     SERVER_MANAGER_XML Resources/MEDReaderServer.xml
54     GUI_INTERFACES ${MEDREADER_IFACES} ${EXTRACTGROUP_IFACES} ${EXTRACTCELLTYPE_IFACES}
55     GUI_RESOURCES Resources/pqMEDReader.qrc
56     GUI_SOURCES ${CLIENT_SRCS}
57     ${CLIENT_UI_SRCS}
58     ${MOC_SRCS}
59     ${MEDREADER_IFACE_SRCS} ${EXTRACTGROUP_IFACE_SRCS} ${EXTRACTCELLTYPE_IFACE_SRCS}
60     CS_KITS
61     # this is the same name as the name in module.cmake file IO
62     # directory.
63     vtkMEDReader
64     )
65   
66 ELSE(PARAVIEW_BUILD_QT_GUI)
67   
68   # create the med reader plugin itself
69   ADD_PARAVIEW_PLUGIN(MEDReaderPlugin "4.0"
70     SERVER_MANAGER_SOURCES ${SM_SRCS}
71     SERVER_MANAGER_XML Resources/MEDReaderServer.xml
72     CS_KITS
73     # this is the same name as the name in module.cmake file IO
74     # directory.
75     vtkMEDReader
76     )
77   
78 ENDIF(PARAVIEW_BUILD_QT_GUI)
79
80 TARGET_LINK_LIBRARIES(MEDReaderPlugin vtkMEDReader vtkMEDReaderCS)
81 # Install
82 INSTALL(
83   TARGETS MEDReaderPlugin
84   RUNTIME DESTINATION lib/paraview
85   LIBRARY DESTINATION lib/paraview
86   ARCHIVE DESTINATION lib/paraview
87   )
88
89
90
91