Commit 3c70c77c authored by Jan Möbius's avatar Jan Möbius

Added plugin keyword PYTHONINTERFACE to specify that the plugin will support python bindings

parent 9efe669f
......@@ -16,7 +16,8 @@
# [INSTALLDATA dir1 dir2 ...]
# [TRANSLATION_LANGUAGES lang1 lang2 ...]
# [TRANSLATION_ADDFILES file1 file2 ...]
# [LICENSEMANAGER])
# [LICENSEMANAGER]
# [PYTHONINTERFACE] )
#
# DIRS = additional directories with source files
......@@ -33,12 +34,13 @@
# 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
# GLEWDEFINITIONS = Checks glew if it defines the given definitions
#
# TRANSLATION_LANGUAGES = language codes for translation
# TRANSLATION_ADDFILES = additional files that should be included into the translation files
#
# LICENSEMANAGER = Compile plugin with license management
# 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
#
# Plugins can implement a acg_list_filter ("listname") macro to filter out
# unneeded headers, sources and ui files from the autogenerated
......@@ -78,7 +80,7 @@ macro (_get_plugin_parameters _prefix)
set (_current_var _foo)
set (_supported_var DIRS TYPES OPT_TYPES DEPS OPTDEPS LDFLAGSADD CFLAGSADD CDEFINITIONSADD
LIBRARIES ADD_CORE_APP_LIBRARIES LIBDIRS INCDIRS ADDSRC INSTALLDATA GLEWDEFINITIONS TRANSLATION_LANGUAGES TRANSLATION_ADDFILES)
set (_supported_flags LICENSEMANAGER)
set (_supported_flags LICENSEMANAGER PYTHONINTERFACE)
foreach (_val ${_supported_var})
set (${_prefix}_${_val})
endforeach ()
......@@ -612,7 +614,7 @@ function (_build_openflipper_plugin plugin)
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
acg_append_files (sources "*.cpp" ${directories})
acg_append_files (ui-files "*.ui" ${directories})
acg_append_files (ui-files "*.ui" ${directories})
acg_append_files (sources "*.c" ${directories})
acg_append_files (qrc "*.qrc" ${directories})
......@@ -636,6 +638,18 @@ function (_build_openflipper_plugin plugin)
endif()
endif ()
if ( ${_PLUGIN}_PYTHONINTERFACE AND NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM )
if(PYTHON3_FOUND)
message("Trying to build ${_PLUGIN}_PYTHONINTERFACE ")
acg_append_files (sources "*.cc" PythonInterface)
include_directories( ${Python3_INCLUDE_DIRS} )
add_definitions(-DPYTHONINTERFACE_ENABLED)
endif()
endif()
add_definitions(${${_PLUGIN}_TYPE_DEFINITIONS})
add_library (Plugin-${plugin} MODULE ${sources} ${headers} ${qrc} ${${_PLUGIN}_ADDSRC})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment