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