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