gstreamer-full: plugin can be registered statically.
authorStéphane Cerveau <scerveau@collabora.com>
Fri, 9 Oct 2020 12:34:12 +0000 (14:34 +0200)
committerStéphane Cerveau <scerveau@collabora.com>
Thu, 12 Nov 2020 10:10:44 +0000 (11:10 +0100)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-python/-/merge_requests/43>

meson.build
plugin/meson.build

index 9ac41ec..4bf65ee 100644 (file)
@@ -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')
index 3fd9e9b..4aa7ec2 100644 (file)
@@ -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]