Functions
ParaViewPlugin.cmake File Reference

Go to the source code of this file.

Functions

function _paraview_plugin_debug (domain, format)
 .md

ParaView Plugin CMake API

More...
 
function paraview_plugin_find_plugins (output)
 .md

Finding plugins

More...
 
macro _paraview_plugin_parse_args (name_output)
 .md

Plugin files

More...
 
function paraview_plugin_scan ()
 .md

Scanning plugins

More...
 
function _paraview_plugin_check_destdir (variable)
 
function paraview_plugin_build ()
 .md

Building plugins

More...
 
function paraview_plugin_write_conf ()
 .md

Plugin configuration files

More...
 
function paraview_add_plugin (name)
 .md

Adding a plugin

More...
 
function paraview_plugin_add_property_widget ()
 .md

Plugin interfaces

More...
 
function paraview_plugin_add_dock_window ()
 .md

Dock window

More...
 
function paraview_plugin_add_action_group ()
 .md

Action group

More...
 
function paraview_plugin_add_toolbar ()
 .md

Toolbar

More...
 
function paraview_plugin_add_auto_start ()
 .md

Auto start

More...
 
function paraview_plugin_add_location ()
 .md

Location

More...
 
function paraview_plugin_add_tree_layout_strategy ()
 .md

Tree layout strategy

More...
 
function paraview_plugin_add_proxy ()
 .md

Proxy

More...
 

Function Documentation

◆ _paraview_plugin_debug()

function _paraview_plugin_debug ( domain  ,
format   
)

.md

ParaView Plugin CMake API

TODO

Conditionally output debug statements

The _paraview_plugin_debug function is provided to assist in debugging. It is controlled by the _paraview_plugin_log variable which contains a list of "domains" to debug.

_paraview_plugin_debug(<domain> <format>)

If the domain is enabled for debugging, the format argument is configured and printed. It should contain @ variable expansions to replace rather than it being done outside. This helps to avoid the cost of generating large strings when debugging is disabled.

Definition at line 29 of file ParaViewPlugin.cmake.

◆ paraview_plugin_find_plugins()

function paraview_plugin_find_plugins ( output  )

.md

Finding plugins

Similar to VTK modules, plugins first have to be discovered. The paraview_plugin_find_plugins function does this. The output variable is the list of discovered paraview.plugin files.

paraview_plugin_find_plugins(<output> [<directory>...])

Definition at line 53 of file ParaViewPlugin.cmake.

◆ _paraview_plugin_parse_args()

macro _paraview_plugin_parse_args ( name_output  )

.md

Plugin files

The paraview.plugin file is parsed and used as arguments to a CMake function.

Example:

AdiosReaderPixie
CONDITION
PARAVIEW_USE_MPI
DESCRIPTION
Pixie file reader using ADIOS
REQUIRES_MODULES
VTK:CommonCore

The supported arguments are:

  • NAME: (Required) The name of the plugin.
  • DESCRIPTION: (Recommended) Short text describing what the plugin does.
  • CONDITION: Arguments to CMake's if command which may be used to hide the plugin for certain platforms or other reasons. If the expression is false, the module is completely ignored.
  • REQUIRES_MODULES: If the plugin is enabled, these modules will be listed as those required to build the enabled plugins.

Definition at line 92 of file ParaViewPlugin.cmake.

◆ paraview_plugin_scan()

function paraview_plugin_scan ( )

.md

Scanning plugins

Once the paraview.plugin files have been found, they need to be scanned to determine which should be built. Generally, plugins should be scanned first in order to use the REQUIRES_MODULES list to enable them during the scan for their required modules.

PLUGIN_FILES <file>...
PROVIDES_PLUGINS <variable>
[ENABLE_BY_DEFAULT <ON|OFF>]
[HIDE_PLUGINS_FROM_CACHE <ON|OFF>]
[REQUIRES_MODULES <module>...])
  • PLUGIN_FILES: (Required) The list of plugin files to scan.
  • PROVIDES_PLUGINS: (Required) This variable contains a list of the plugins to be built.
  • ENABLE_BY_DEFAULT: (Defaults to OFF) Whether to enable plugins by default or not.
  • HIDE_PLUGINS_FROM_CACHE: (Defaults to OFF) Whether to display options to enable and disable plugins in the cache or not.
  • REQUIRES_MODULES: The list of modules required by the enabled plugins.

Definition at line 150 of file ParaViewPlugin.cmake.

◆ _paraview_plugin_check_destdir()

function _paraview_plugin_check_destdir ( variable  )

Definition at line 266 of file ParaViewPlugin.cmake.

◆ paraview_plugin_build()

function paraview_plugin_build ( )

.md

Building plugins

Once all plugins have been scanned, they need to be built.

PLUGINS <plugin>...
[AUTOLOAD <plugin>...]
[PLUGINS_COMPONENT <component>]
[TARGET <target>]
[INSTALL_EXPORT <export>]
[CMAKE_DESTINATION <destination>]
[TARGET_COMPONENT <component>]
[INSTALL_HEADERS <ON|OFF>]
[USE_FILE_SETS <ON|OFF>]
[HEADERS_DESTINATION <destination>]
[RUNTIME_DESTINATION <destination>]
[LIBRARY_DESTINATION <destination>]
[LIBRARY_SUBDIRECTORY <subdirectory>]
[ADD_INSTALL_RPATHS <ON|OFF>]
[PLUGINS_FILE_NAME <filename>]
[DISABLE_XML_DOCUMENTATION <ON|OFF>])
[GENERATE_SPDX <ON|OFF>]
[SPDX_DOCUMENT_NAMESPACE <uri>]
[SPDX_DOWNLOAD_LOCATION <url>]
  • PLUGINS: (Required) The list of plugins to build. May be empty.
  • AUTOLOAD: A list of plugins to mark for autoloading.
  • PLUGINS_COMPONENT: (Defaults to paraview_plugins) The installation component to use for installed plugins.
  • TARGET: (Recommended) The name of an interface target to generate. This provides. an initialization function <TARGET>_initialize which initializes static plugins. The function is provided, but is a no-op for shared plugin builds.
  • INSTALL_EXPORT: If provided, the generated target will be added to the named export set.
  • CMAKE_DESTINATION: If provided, the plugin target's properties will be written to a file named <TARGET>-paraview-plugin-properties.cmake in the specified destination.
  • TARGET_COMPONENT: (Defaults to development) The component to use for <TARGET>.
  • INSTALL_HEADERS: (Defaults to ON) Whether to install headers or not.
  • USE_FILE_SETS: (Defaults to OFF) Whether to use FILE_SET source specification or not.
  • HEADERS_DESTINATION: (Defaults to ${CMAKE_INSTALL_INCLUDEDIR}) Where to install include files.
  • RUNTIME_DESTINATION: (Defaults to ${CMAKE_INSTALL_BINDIR}) Where to install runtime files.
  • LIBRARY_DESTINATION: (Defaults to ${CMAKE_INSTALL_LIBDIR}) Where to install modules built by plugins.
  • LIBRARY_SUBDIRECTORY: (Defaults to "") Where to install the plugins themselves. Each plugin lives in a directory of its name in <RUNTIME_DESTINATION>/<LIBRARY_SUBDIRECTORY> (for Windows) or <LIBRARY_DESTINATION>/<LIBRARY_SUBDIRECTORY> for other platforms.
  • ADD_INSTALL_RPATHS: (Defaults to ON) If specified, an RPATH to load dependent libraries from the LIBRARY_DESTINATION from the plugins will be added.
  • PLUGINS_FILE_NAME: The name of the XML plugin file to generate for the built plugins. This file will be placed under <LIBRARY_DESTINATION>/<LIBRARY_SUBDIRECTORY>. It will be installed with the plugin component.
  • DISABLE_XML_DOCUMENTATION: (Defaults to OFF) Whether to forcefully disable XML documentation or not.
  • GENERATE_SPDX: (Defaults to OFF) Whether or not to generate and install SPDX file for each modules.
  • SPDX_DOCUMENT_NAMESPACE: (Defaults to "") Document namespace to use when generating SPDX files.
  • SPDX_DOWNLOAD_LOCATION: (Defaults to "") Download location to use when generating SPDX files.

Definition at line 351 of file ParaViewPlugin.cmake.

◆ paraview_plugin_write_conf()

function paraview_plugin_write_conf ( )

.md

Plugin configuration files

Applications will want to consume plugin targets by discovering their locations at runtime. In order to facilitate this, ParaView supports loading a conf file which contains the locations of plugin targets' XML files. The plugins specified in that file is then

NAME <name>
PLUGINS_TARGETS <target>...
BUILD_DESTINATION <destination>
[INSTALL_DESTINATION <destination>]
[COMPONENT <component>])
  • NAME: (Required) The base name of the configuration file.
  • PLUGINS_TARGETS: (Required) The list of plugin targets to add to the configuration file.
  • BUILD_DESTINATION: (Required) Where to place the configuration file in the build tree.
  • INSTALL_DESTINATION: Where to install the configuration file in the install tree. If not provided, the configuration file will not be installed.
  • COMPONENT: (Defaults to runtime) The component to use when installing the configuration file.

Definition at line 805 of file ParaViewPlugin.cmake.

◆ paraview_add_plugin()

function paraview_add_plugin ( name  )

.md

Adding a plugin

TODO: Describe.

[REQUIRED_ON_SERVER] [REQUIRED_ON_CLIENT]
VERSION <version>
[MODULE_FILES <vtk.module>...]
[MODULE_ARGS <arg>...]
[MODULES <module>...]
[SOURCES <source>...]
[SERVER_MANAGER_XML <xml>...]
[MODULE_INSTALL_EXPORT <export>]
[UI_INTERFACES <interface>...]
[UI_RESOURCES <resource>...]
[UI_FILES <file>...]
[PYTHON_MODULES <module>...]
[INITIALIZERS <initializerFunction>...]
[EXTRA_INCLUDES <file>...]
[REQUIRED_PLUGINS <plugin>...]
[EULA <eula>]
[XML_DOCUMENTATION <ON|OFF>]
[DOCUMENTATION_DIR <directory>]
[DOCUMENTATION_ADD_PATTERNS <pattern>...]
[DOCUMENTATION_TOC <string>]
[DOCUMENTATION_DEPENDENCIES <target>...]
[FORCE_STATIC <ON|OFF>])
[TRANSLATIONS_DIRECTORY <directory>]
[TRANSLATIONS_TARGET <target>]
  • REQUIRED_ON_SERVER: The plugin is required to be loaded on the server for proper functionality.
  • REQUIRED_ON_CLIENT: The plugin is required to be loaded on the client for proper functionality.
  • VERSION: (Required) The version number of the plugin.
  • MODULE_FILES: Paths to vtk.module files describing modules to include in the plugin.
  • MODULE_ARGS: Arguments to pass to vtk_module_build for included modules.
  • MODULES: Modules to include in the plugin. These modules will be wrapped using client server and have their server manager XML files processed.
  • SOURCES: Source files for the plugin.
  • SERVER_MANAGER_XML: Server manager XML files for the plugin.
  • UI_INTERFACES: Interfaces to initialize, in the given order. See the plugin interfaces section for more details.
  • MODULE_INSTALL_EXPORT: (Defaults to <name>) If provided, any modules will be added to the given export set.
  • UI_RESOURCES: Qt resource files to include with the plugin.
  • UI_FILES: Qt .ui files to include with the plugin.
  • PYTHON_MODULES: Python modules to embed into the plugin.
  • INITIALIZERS: An ordered list of free functions (declared in EXTRA_INCLUDES if needed) to be invoked when the plugin is loaded. Each function must be callable with no arguments.
  • EXTRA_INCLUDES: Headers needed by the generated plugin code (such as INITIALIZERS). Filename paths passed without quotes will be double-quoted (e.g.,
    `#include "foo.h"`
    ), while paths that start with angle- or double-quotes will not be.
  • REQUIRED_PLUGINS: Plugins which must be loaded for this plugin to function. These plugins do not need to be available at build time and are therefore their existence is not checked here.
  • EULA: A file with content to display as an end-user license agreement before the plugin is initialized at runtime.
  • XML_DOCUMENTATION: (Defaults to ON) If set, documentation will be generated for the associated XML files.
  • DOCUMENTATION_DIR: If specified, *.html, *.css, *.png, *.js, and *.jpg files in this directory will be copied and made available to the documentation.
  • DOCUMENTATION_ADD_PATTERNS: If specified, adds patterns for the documentation files within DOCUMENTATION_DIR other than the default ones (see DOCUMENTATION_DIR help)
  • DOCUMENTATION_TOC: If specified, use this string for describing the table of content for the documentation.
  • DOCUMENTATION_DEPENDENCIES: Targets that are needed to be built before building the documentation.
  • EXPORT: (Deprecated) Use paraview_plugin_build(INSTALL_EXPORT) instead.
  • FORCE_STATIC: (Defaults to OFF) If set, the plugin will be built statically so that it can be embedded into an application.
  • TRANSLATIONS_DIRECTORY: (Defaults to ${CMAKE_CURRENT_BINARY_DIR}/Translations) The path of the directory where translation source files are stored.
  • TRANSLATION_TARGET : The name of the target on which to add the ts file as dependency.

Definition at line 1011 of file ParaViewPlugin.cmake.

◆ paraview_plugin_add_property_widget()

function paraview_plugin_add_property_widget ( )

.md

Plugin interfaces

ParaView plugins may satisfy a number of interfaces. These functions all take a INTERFACES argument which takes the name of a variable to set with the name of the interface generated. This variable's should be passed to paraview_add_plugin's UI_INTERFACES argument. .md

Property widget

TODO: What is a property widget?

KIND <WIDGET|GROUP_WIDGET|WIDGET_DECORATOR>
TYPE <type>
CLASS_NAME <name>
INTERFACES <variable>
SOURCES <variable>)
  • KIND: The kind of widget represented.
  • TYPE: The name of the property type.
  • CLASS_NAME: The name of the property widget class.
  • INTERFACES: The name of the generated interface.
  • SOURCES: The source files generated by the interface.

Definition at line 1629 of file ParaViewPlugin.cmake.

◆ paraview_plugin_add_dock_window()

function paraview_plugin_add_dock_window ( )

.md

Dock window

TODO: What is a dock window?

CLASS_NAME <name>
[DOCK_AREA <Right|Left|Top|Bottom>]
INTERFACES <variable>
SOURCES <variable>)
  • CLASS_NAME: The name of the dock window class.
  • DOCK_AREA: (Default Left) Where to dock the window within the application.
  • INTERFACES: The name of the generated interface.
  • SOURCES: The source files generated by the interface.

Definition at line 1715 of file ParaViewPlugin.cmake.

◆ paraview_plugin_add_action_group()

function paraview_plugin_add_action_group ( )

.md

Action group

TODO: What is an action group?

CLASS_NAME <name>
GROUP_NAME <name>
INTERFACES <variable>
SOURCES <variable>)
  • CLASS_NAME: The name of the action group class.
  • GROUP_NAME: The name of the action group.
  • INTERFACES: The name of the generated interface.
  • SOURCES: The source files generated by the interface.

Definition at line 1793 of file ParaViewPlugin.cmake.

◆ paraview_plugin_add_toolbar()

function paraview_plugin_add_toolbar ( )

.md

Toolbar

TODO: What is a toolbar?

CLASS_NAME <name>
INTERFACES <variable>
SOURCES <variable>)
  • CLASS_NAME: The name of the toolbar class.
  • INTERFACES: The name of the generated interface.
  • SOURCES: The source files generated by the interface.

Definition at line 1861 of file ParaViewPlugin.cmake.

◆ paraview_plugin_add_auto_start()

function paraview_plugin_add_auto_start ( )

.md

Auto start

TODO: What is an auto start?

CLASS_NAME <name>
[STARTUP <function>]
[SHUTDOWN <function>]
INTERFACES <variable>
SOURCES <variable>)
  • CLASS_NAME: The name of the auto start class.
  • STARTUP: (Defaults to startup) The name of the method to call on startup.
  • SHUTDOWN: (Defaults to shutdown) The name of the method to call on shutdown.
  • INTERFACES: The name of the generated interface.
  • SOURCES: The source files generated by the interface.

Definition at line 1930 of file ParaViewPlugin.cmake.

◆ paraview_plugin_add_location()

function paraview_plugin_add_location ( )

.md

Location

The filesystem location of dynamically-loaded plugin.

CLASS_NAME <name>
[STORE <function>]
INTERFACES <variable>
SOURCES <variable>)
  • CLASS_NAME: The name of the location class.
  • STORE: (Defaults to StoreLocation) The name of the method to call on startup, passing in the plugin location (const char*).
  • INTERFACES: The name of the generated interface.
  • SOURCES: The source files generated by the interface.

Definition at line 2004 of file ParaViewPlugin.cmake.

◆ paraview_plugin_add_tree_layout_strategy()

function paraview_plugin_add_tree_layout_strategy ( )

.md

Tree layout strategy

TODO: What is a tree layout strategy?

STRATEGY_TYPE <type>
STRATEGY_LABEL <label>
INTERFACES <variable>
SOURCES <variable>)
  • STRATEGY_TYPE: The name of the tree layout strategy class.
  • STRATEGY_LABEL: The label to use for the strategy.
  • INTERFACES: The name of the generated interface.
  • SOURCES: The source files generated by the interface.

Definition at line 2073 of file ParaViewPlugin.cmake.

◆ paraview_plugin_add_proxy()

function paraview_plugin_add_proxy ( )

.md

Proxy

TODO: What is a proxy?

NAME <name>
INTERFACES <variable>
SOURCES <variable>
[PROXY_TYPE <type>
[CLASS_NAME <class>]
XML_GROUP <group>
<XML_NAME|XML_NAME_REGEX> <name>]...)
  • NAME: The name of the proxy.
  • INTERFACES: The name of the generated interface.
  • SOURCES: The source files generated by the interface.

At least one PROXY_TYPE must be specified. Each proxy type must be given an XML_GROUP and either an XML_NAME or XML_NAME_REGEX. If CLASS_NAME is not given, the PROXY_TYPE name is used instead.

Definition at line 2149 of file ParaViewPlugin.cmake.