summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@collabora.com>2020-10-09 14:34:12 +0200
committerStéphane Cerveau <scerveau@collabora.com>2020-11-12 11:10:44 +0100
commit7a0decbec242b026391ff6504f0619259aa34721 (patch)
tree61b780d3de837fb10c72b69a07d71f4ac97460a2
parent2b5b0d951ed997462c5e1d0ec9f70cabe023058a (diff)
gstreamer-full: plugin can be registered statically.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-python/-/merge_requests/43>
-rw-r--r--meson.build8
-rw-r--r--plugin/meson.build6
2 files changed, 11 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 9ac41ec..4bf65ee 100644
--- a/meson.build
+++ b/meson.build
@@ -84,6 +84,14 @@ cdata.set('PYTHON_VERSION', '"@0@"'.format(python_dep.version()))
configure_file(output : 'config.h', configuration : cdata)
configinc = include_directories('.')
+pkgconfig = import('pkgconfig')
+plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
+plugins_pkgconfig_install_dir = join_paths(plugins_install_dir, 'pkgconfig')
+if get_option('default_library') == 'shared'
+ # If we don't build static plugins there is no need to generate pc files
+ plugins_pkgconfig_install_dir = disabler()
+endif
+
subdir('gi')
subdir('plugin')
subdir('testsuite')
diff --git a/plugin/meson.build b/plugin/meson.build
index 3fd9e9b..4aa7ec2 100644
--- a/plugin/meson.build
+++ b/plugin/meson.build
@@ -1,9 +1,9 @@
-gst_elements_shared = shared_library('gstpython',
+gstpython = library('gstpython',
['gstpythonplugin.c'],
include_directories : [configinc],
dependencies : [gst_dep, pygobject_dep, gstbase_dep, python_dep, gmodule_dep],
install : true,
install_dir : '@0@/gstreamer-1.0'.format(get_option('libdir')),
)
-
-plugins = [gst_elements_shared]
+pkgconfig.generate(gstpython, install_dir : plugins_pkgconfig_install_dir)
+plugins = [gstpython]