Salome HOME
Copyright update 2022
[modules/paravis.git] / src / Plugins / MEDReader / plugin / ParaViewPlugin / CMakeLists.txt
1 # Copyright (C) 2010-2022  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 set(interfaces)
21 set(ui_files)
22 set(sources)
23
24 cmake_policy(SET CMP0071 OLD) # bug in ParaViewPlugin.cmake?
25
26 if(PARAVIEW_USE_QT)
27   set(ui_files
28     MEDReaderVectorsWidget.ui
29     MEDReaderTimeModeWidget.ui)
30
31   set(sources
32     pqAbstractFieldsWidget.cxx
33     VectBoolSpreadSheet.cxx
34     VectBoolWidget.cxx
35     pqExtractGroupFieldsWidget.cxx
36     pqMEDReaderGraphUtils.cxx
37     pqMEDReaderVectorsWidget.cxx
38     pqMEDReaderTimeModeWidget.cxx
39     pqMEDReaderReloadWidget.cxx
40     pqMEDReaderTimesFlagsWidget.cxx
41     pqMEDReaderFieldsWidget.cxx)
42
43   paraview_plugin_add_property_widget(
44     KIND WIDGET
45     TYPE "MEDReaderTimeModeWidgetType"
46     CLASS_NAME pqMEDReaderTimeModeWidget
47     INTERFACES property_interfaces
48     SOURCES property_sources)
49   list(APPEND interfaces
50     ${property_interfaces})
51   list(APPEND sources
52     ${property_sources})
53
54   paraview_plugin_add_property_widget(
55     KIND WIDGET
56     TYPE "MEDReaderReloadWidgetType"
57     CLASS_NAME pqMEDReaderReloadWidget
58     INTERFACES property_interfaces
59     SOURCES property_sources)
60   list(APPEND interfaces
61     ${property_interfaces})
62   list(APPEND sources
63     ${property_sources})
64
65   paraview_plugin_add_property_widget(
66     KIND WIDGET
67     TYPE "MEDReaderVectorsWidgetType"
68     CLASS_NAME pqMEDReaderVectorsWidget
69     INTERFACES property_interfaces
70     SOURCES property_sources)
71   list(APPEND interfaces
72     ${property_interfaces})
73   list(APPEND sources
74     ${property_sources})
75
76   paraview_plugin_add_property_widget(
77     KIND WIDGET
78     TYPE "MEDReaderTimesFlagsWidgetType"
79     CLASS_NAME pqMEDReaderTimesFlagsWidget
80     INTERFACES property_interfaces
81     SOURCES property_sources)
82   list(APPEND interfaces
83     ${property_interfaces})
84   list(APPEND sources
85     ${property_sources})
86
87   paraview_plugin_add_property_widget(
88     KIND WIDGET
89     TYPE "MEDReaderFieldsWidgetType"
90     CLASS_NAME pqMEDReaderFieldsWidget
91     INTERFACES property_interfaces
92     SOURCES property_sources)
93   list(APPEND interfaces
94     ${property_interfaces})
95   list(APPEND sources
96     ${property_sources})
97
98   paraview_plugin_add_property_widget(
99     KIND WIDGET
100     TYPE "ExtractGroupFieldsWidgetType"
101     CLASS_NAME pqExtractGroupFieldsWidget
102     INTERFACES property_interfaces
103     SOURCES property_sources)
104   list(APPEND interfaces
105     ${property_interfaces})
106   list(APPEND sources
107     ${property_sources})
108
109 endif(PARAVIEW_USE_QT)
110
111 paraview_add_plugin(MEDReader
112   VERSION "5.0"
113   UI_INTERFACES ${interfaces}
114   UI_FILES ${ui_files}
115   SOURCES ${sources}
116   UI_RESOURCES Resources/pqMEDReader.qrc
117   SERVER_MANAGER_XML Resources/MEDReaderServer.xml
118   MODULES MEDReaderIO
119   MODULE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/../MEDReaderIO/vtk.module"
120   )
121
122 install(TARGETS MEDReader
123   RUNTIME DESTINATION lib/paraview
124   LIBRARY DESTINATION lib/paraview
125   ARCHIVE DESTINATION lib/paraview
126   )