Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
3c70c77c
Commit
3c70c77c
authored
Jan 23, 2019
by
Jan Möbius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added plugin keyword PYTHONINTERFACE to specify that the plugin will support python bindings
parent
9efe669f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
cmake/plugin.cmake
cmake/plugin.cmake
+19
-5
No files found.
cmake/plugin.cmake
View file @
3c70c77c
...
...
@@ -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
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment