Salome HOME
Merge from BR_PORTING_VTK6 01/03/2013
[modules/paravis.git] / src / Plugins / MedReader / ParaViewPlugin / CMakeLists.txt
1 # Copyright (C) 2010-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 include indirectories to the vtk files in this plugin.
21 include_directories(
22   ${MedReader_SOURCE_DIR}/IO
23   ${MedReader_BINARY_DIR}/IO)
24
25
26 SET(SM_SRCS
27     vtkSMMedGroupSelectionDomain.cxx
28     )
29
30 IF(PARAVIEW_BUILD_QT_GUI)
31
32     QT4_WRAP_UI(CLIENT_UI_SRCS
33         Resources/UI/MedReaderPanel.ui
34         Resources/UI/ExtractGroupPanel.ui
35     )
36
37     # create a plugin that implements an object panel for the reader
38     SET(CLIENT_SRCS
39         pqMedReaderPanel.cxx
40         pqExtractGroupPanel.cxx
41     )
42
43     QT4_WRAP_CPP(MOC_SRCS
44         pqMedReaderPanel.h
45         pqExtractGroupPanel.h
46     )
47
48     ADD_PARAVIEW_OBJECT_PANEL(MEDREADER_IFACES MEDREADER_IFACE_SRCS
49         CLASS_NAME pqMedReaderPanel
50         XML_NAME MedReader
51         XML_GROUP sources
52     )
53         
54     ADD_PARAVIEW_OBJECT_PANEL(EXTRACTGROUP_IFACES EXTRACTGROUP_IFACE_SRCS
55         CLASS_NAME pqExtractGroupPanel
56         XML_NAME ExtractGroup
57         XML_GROUP filters
58     )
59     
60     # create the med reader plugin itself
61     ADD_PARAVIEW_PLUGIN(MedReaderPlugin "4.0"
62         SERVER_MANAGER_SOURCES ${SM_SRCS}
63         SERVER_MANAGER_XML Resources/MedReaderServer.xml
64         GUI_INTERFACES ${MEDREADER_IFACES} ${EXTRACTGROUP_IFACES}
65         GUI_RESOURCES Resources/pqMedReader.qrc
66         GUI_SOURCES ${CLIENT_SRCS}
67               ${CLIENT_UI_SRCS}
68               ${MOC_SRCS}
69               ${MEDREADER_IFACE_SRCS}
70               ${EXTRACTGROUP_IFACE_SRCS}
71         CS_KITS
72             # this is the same name as the name in module.cmake file IO
73             # directory.
74             vtkMedReader
75     )
76         
77 ELSE(PARAVIEW_BUILD_QT_GUI)
78           
79     # create the med reader plugin itself
80     ADD_PARAVIEW_PLUGIN(MedReaderPlugin "4.0"
81         SERVER_MANAGER_SOURCES ${SM_SRCS}
82         SERVER_MANAGER_XML Resources/MedReaderServer.xml
83         CS_KITS
84             # this is the same name as the name in module.cmake file IO
85             # directory.
86             vtkMedReader
87     )
88     
89 ENDIF(PARAVIEW_BUILD_QT_GUI)
90
91 TARGET_LINK_LIBRARIES(MedReaderPlugin vtkMedReader vtkMedReaderCS)
92
93 # Install
94 INSTALL(
95     TARGETS MedReaderPlugin
96     RUNTIME DESTINATION lib/paraview
97     LIBRARY DESTINATION lib/paraview
98     ARCHIVE DESTINATION lib/paraview
99 )
100
101
102
103