xentara-plugin v1.2.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.

Commands

void  install_xentara_plugin (target [...])
  Installs a plugin library together with the manifest file needed by Xentara to load the plugin 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.