cmake_plugin_usage.txt 2.87 KB
Newer Older
1
openflipper_plugin ( [DIRS dir1 dir2 ...]
Jan Möbius's avatar
Jan Möbius committed
2 3
                     [TYPES type1 type2 ...] 
                     [OPT_TYPES type1 type2 ...] 
4 5 6 7
                     [DEPS dep1 dep2 ...]
                     [OPTDEPS dep1 dep2 ...]
                     [LDFLAGSADD flag1 flag2 ...]
                     [CFLAGSADD flag1 flag2 ...]
Jan Möbius's avatar
Jan Möbius committed
8
                     [CDEFINITIONSADD definition1 definition2 ...]
9
                     [LIBRARIES lib1 lib2 ...]
Jan Möbius's avatar
Jan Möbius committed
10
                     [ADD_CORE_APP_LIBRARIES lib1 lib2 ...]
11 12 13 14 15 16
                     [LIBDIRS dir1 dir2 ...]
                     [INCDIRS dir1 dir2 ...]
                     [ADDSRC file1 file2 ...]
                     [INSTALLDATA dir1 dir2 ...]
                     [TRANSLATION_LANGUAGES lang1 lang2 ...]
                     [TRANSLATION_ADDFILES file1 file2 ...]
Jan Möbius's avatar
Jan Möbius committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
                     [LICENSEMANAGER]
                     [PYTHONINTERFACE] )


DIRS                   = additional directories with source files
TYPES                  = List of datatypes required by this plugin (uppercase)
OPT_TYPES              = List of optional datatypes for this plugin (uppercase)
DEPS                   = required dependencies for find_package macro
OPTDEPS                = optional dependencies for find_package macro, if found, a define ENABLE_<Depname> will be added automatically
LDFLAGSADD             = flags added to the link command
CFLAGSADD              = flags added to the compile command
CDEFINITIONSADD        = definitions added to the compile command
LIBRARIES              = libraries added to link command
ADD_CORE_APP_LIBRARIES = libraries added to be linked to the core app
LIBDIRS                = additional link directories
INCDIRS                = additional include directories
ADDSRC                 = additional source files
INSTALLDATA            = directories that will be installed into the openflipper data directory
GLEWDEFINITIONS        = Checks glew if it defines the given definitions
Jan Möbius's avatar
Jan Möbius committed
36

37 38
TRANSLATION_LANGUAGES = language codes for translation
TRANSLATION_ADDFILES  = additional files that should be included into the translation files
Jan Möbius's avatar
Jan Möbius committed
39

Jan Möbius's avatar
Jan Möbius committed
40 41
LICENSEMANAGER   = Compile plugin with license management
PYTHONINTERFACE  = if defined, the plugin will try to build a python interface which has to be in a subdirectory called PythonInterface
Jan Möbius's avatar
Jan Möbius committed
42 43

Plugins can implement a acg_list_filter ("listname") macro to filter out
Jan Möbius's avatar
Jan Möbius committed
44
unneeded headers, sources and ui files from the autogenerated
Jan Möbius's avatar
Jan Möbius committed
45 46 47 48 49 50 51
build sources lists (see common.cmake drop_templates macro)

Translations
Create a subdirectory called translations in your Plugin directory
The *.ts files there will be used for the translations

Special DEPS:
Jan Möbius's avatar
Jan Möbius committed
52
CUDA:
Jan Möbius's avatar
Jan Möbius committed
53 54 55 56 57
If your plugin requires cuda, add "CUDA" to the list of dependencies
and create a subdir called Cuda in your plugin directory
The files in this directory will be compiled by nvcc and linked
into the plugin

Jan Möbius's avatar
Jan Möbius committed
58 59
The variables PLUGIN_${plugin}_MISSING_DEPS indicate whether any mandatory
dep
Jan Möbius's avatar
Jan Möbius committed
60