xentara-plugin v2.1
The Xentara Plugin Framework
Loading...
Searching...
No Matches
CMake Integration

The Xentara plugin framework comes with a CMake module named XentaraPlugin. To link a target against the Xentara plugin framework, include the following lines in your CMakeLists.txt file:

find_package(XentaraPlugin REQUIRED)
target_link_libraries(myTarget PRIVATE Xentara::xentara-plugin)

Replace myTarget with the name of your target. The target must have been added using CMake's add_library command using MODULE as library type.

To install your plugin library, you must use the command install_xentara_plugin instead of CMake's install command. This will generate the plugin manifest file necessary for Xentara to load your plugin, and install it together with the library. To install your plugin and its manifest file, add the following line to your CMakeLists.txt file:

Replace myTarget with the name of your target.

Targets

Xentara::xentara-plugin
  The Xentara plugin framework
 

Commands

void  install_xentara_plugin (target [...])
  Installs a plugin library together with the manifest file needed by Xentara to load the plugin More...
 

Variables

Note
The standard variables set by the find_package() command, like XentaraPlugin_FOUND, XentaraPlugin_DIR, and XentaraPlugin_VERSION, are not described in this documentation. Please refer to the documentation of find_package() for information on the variables that that command sets.
XentaraPlugin_DOXYGEN_TAG_FILE
  The location of the Doxygen tag file for the Xentara plugin framework documentation More...
 
Xentara_PRODUCT_VERSION
  The version of the Xentara product More...
 
Xentara_DEBIAN_PRODUCT_VERSION
  The Debian package version of the Xentara product More...
 
Xentara_RPM_PRODUCT_VERSION
  The RPM package version of the Xentara product More...
 

Command Documentation

◆ install_xentara_plugin

install_xentara_plugin ( target
[ NAME  plugin_name ]
[ DESTINATION  directory ]
[ MANIFEST_DESTINATION  directory ]
[ MANIFEST_FILE_NAME  manifest_file_name ]
[ PERMISSIONS  permissions ... ]
[ CONFIGURATIONS  [ Debug | Release | ... ] ]
[ COMPONENT  component ]
[ NAMELINK_COMPONENT  component ]
[ EXCLUDE_FROM_ALL ]
[ NAMELINK_SKIP ]
)

Installs a plugin library together with the manifest file needed by Xentara to load the plugin.

The target should be a library target added using add_library(target MODULE ...). install_xentara_plugin only installs the LIBRARY artifacts of target, which you would normally install using install(TARGETS target LIBRARY ...). If you want to install other artifacts of your target, you have to add additional, regular install commands.

Options
target Specifies the library target that generates the plugin library
NAME  plugin_name Specifies the name of the plugin as it should appear in the plugin manifest. If you do not specify this option, a plugin name will be generated from the target name.
DESTINATION  directory Specifies the directory where the plugin library will be installed. If a relative path is given it is interpreted relative to the value of the CMAKE_INSTALL_PREFIX variable. If you do not specify a destination, the plugin library will be installed in "${CMAKE_INSTALL_BINDIR}" under Windows, and "${CMAKE_INSTALL_LIBDIR}" everywhere else.
MANIFEST_DESTINATION  directory Specifies the directory where the plugin manifest will be installed. If a relative path is given it is interpreted relative to the value of the CMAKE_INSTALL_PREFIX variable. If you do not specify a destination, the plugin manifest will be installed in a default location under "${CMAKE_INSTALL_DATAROOTDIR}".
MANIFEST_FILE_NAME  manifest_file_name Specifies the file name of the plugin manifest. The file name must have the extension .json. If you do not specify this option, a file name will be generated based on the target name.
 
PERMISSIONS 
CONFIGURATIONS 
COMPONENT 
NAMELINK_COMPONENT 
EXCLUDE_FROM_ALL 
NAMELINK_SKIP 
permissions ...
[ Debug | Release | ... ]
component
component

These options are the same as the corresponding options of the CMake install(TARGETS ...) command. Please see the CMake documentation for a detailed description of these options.

Variable Documentation

◆ XentaraPlugin_DOXYGEN_TAG_FILE

XentaraPlugin_DOXYGEN_TAG_FILE

The location of the Doxygen tag file for the Xentara plugin framework documentation.

This variable contains the path to a Doxygen tag file that can be used to link other Doxygen documentation to the Xentara plugin framework documentation. See Linking to external documentation in the Doxygen documentation for details.

◆ Xentara_PRODUCT_VERSION

Xentara_PRODUCT_VERSION

The version of the Xentara product.

This variable contains the version of the Xentara product that the included *XentaraPlugin* module belongs to. It can be used to generate file names and version numbers for CPack packages, for example.

◆ Xentara_DEBIAN_PRODUCT_VERSION

Xentara_DEBIAN_PRODUCT_VERSION

The Debian package version of the Xentara product.

This variable contains the Debian package version of the Xentara product that the included XentaraPlugin module belongs to. It can be used in the CMake variable CPACK_DEBIAN_PACKAGE_DEPENDS or CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS to add a dependency on the xentara-dev package. You can add a dependency on xentara-dev to the “dev” component, for example, by including the following to your CMakeLists.txt file:

set(CPACK_DEBIAN_DEV_PACKAGE_DEPENDS "xentara-dev (>= ${Xentara_DEBIAN_PRODUCT_VERSION})")

This variable can also be used to add a dependency to the xentara runtime package. It is generally preferrable to enable CPACK_DEBIAN_PACKAGE_SHLIBDEPS to add a dependency to the xentara, package however.

Note
This variable is only available under Linux when targeting a Linux distribution that uses the Debian package manager, like Debian or Ubuntu.

◆ Xentara_RPM_PRODUCT_VERSION

Xentara_RPM_PRODUCT_VERSION

The RPM package version of the Xentara product.

This variable contains the RPM package version of the Xentara product that the included XentaraPlugin module belongs to. It can be used in the CMake variable CPACK_RPM_PACKAGE_REQUIRES or CPACK_RPM_<component>_PACKAGE_REQUIRES to add a dependency on the xentara-dev package. You can add a dependency on xentara-devel to the “devel” component, for example, by including the following to your CMakeLists.txt file:

set(CPACK_RPM_DEVEL_PACKAGE_REQUIRES "xentara-devel >= ${Xentara_RPM_PRODUCT_VERSION}"

This variable can also be used to add a dependency to the xentara runtime package. It is generally preferrable to enable CPACK_RPM_PACKAGE_AUTOREQ to add a dependency to the xentara, package however.

Note
This variable is only available under Linux when targeting a Linux distribution that uses the RPM package manager, like Fedora Linux.