Salome HOME
Copyright update 2022
[modules/paravis.git] / src / Plugins / View / 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 cmake_minimum_required(VERSION 3.12)
21
22 INCLUDE(UseQtExt)
23
24 # create a plugin with a custom view that shows up in ParaView's multi-view
25 # manager.  this plugin also contains a custom display panel
26
27 # moc the Qt based .h files
28 QT_WRAP_MOC(MOC_SRCS MyView.h MyDisplay.h MyViewActiveOptions.h MyViewOptions.h)
29
30 # invoke macro to create sources for our custom view and display panel
31 ADD_PARAVIEW_VIEW_MODULE(
32                          # returns the interfaces defined (pass in
33                          # GUI_INTERFACES parameter)
34                          IFACES  
35                          # returns a list of source files for this interface
36                          IFACE_SRCS 
37                          # give the view type 
38                          # With MyView.h implementing a
39                          # pqGenericViewModule and MyView being the XML name
40                          # for the view on the server side
41                          VIEW_TYPE MyView 
42                          # the XML group of the view in the server manager xml
43                          VIEW_XML_GROUP views
44                          # the XML name of the display for this view
45                          DISPLAY_XML MyDisplay 
46                          # the name of the display panel for this display
47                          # With MyDisplay.h implementing pqDisplayPanel
48                          DISPLAY_PANEL MyDisplay)
49
50
51 ADD_PARAVIEW_VIEW_OPTIONS(OPTIONS_IFACE OPTIONS_IFACE_SRCS
52                           VIEW_TYPE MyView ACTIVE_VIEW_OPTIONS MyViewActiveOptions)
53
54 # create a GUI side plugin with the GUI side code
55 #ADD_PARAVIEW_PLUGIN(GUISampleView "1.0" GUI_INTERFACES ${IFACES} ${OPTIONS_IFACE}
56 #                    GUI_SOURCES MyView.cxx MyDisplay.cxx MyViewActiveOptions.cxx MyViewOptions.cxx
57 #                    ${MOC_SRCS} ${IFACE_SRCS} ${OPTIONS_IFACE_SRCS})
58
59 # create a server side plugin with the server side code
60 #ADD_PARAVIEW_PLUGIN(SMSampleView "1.0" SERVER_MANAGER_XML MyViewSM.xml)
61
62   ADD_PARAVIEW_PLUGIN(GUISampleView "1.0"
63     SERVER_MANAGER_XML MyViewSM.xml
64     GUI_INTERFACES ${IFACES} ${OPTIONS_IFACE}
65     GUI_SOURCES MyView.cxx MyDisplay.cxx MyViewActiveOptions.cxx MyViewOptions.cxx
66     ${MOC_SRCS} ${IFACE_SRCS} ${OPTIONS_IFACE_SRCS} )
67 # one could combine the two plugins into one if desired
68
69 INSTALL(
70         TARGETS GUISampleView
71         DESTINATION lib/paraview
72 )