meson: generate pkg-config files for our plugins
authorMatthew Waters <matthew@centricular.com>
Fri, 2 Nov 2018 13:49:01 +0000 (00:49 +1100)
committerMatthew Waters <matthew@centricular.com>
Mon, 5 Nov 2018 15:18:41 +0000 (15:18 +0000)
meson.build
plugins/elements/meson.build
plugins/tracers/meson.build

index f4c3a8c..739d942 100644 (file)
@@ -503,6 +503,15 @@ if bashcomp_dep.found()
   endif
 endif
 
+plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
+
+pkgconfig = import('pkgconfig')
+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('gst')
 subdir('libs')
 subdir('plugins')
index 8757aec..6f7cbf5 100644 (file)
@@ -31,5 +31,6 @@ gst_elements = library('gstcoreelements',
   include_directories : [configinc],
   dependencies : [gobject_dep, glib_dep, gst_dep, gst_base_dep],
   install : true,
-  install_dir : join_paths(get_option('libdir'), 'gstreamer-1.0'),
+  install_dir : plugins_install_dir,
 )
+pkgconfig.generate(gst_elements, install_dir : plugins_pkgconfig_install_dir)
index da3ced5..26cd3ab 100644 (file)
@@ -21,6 +21,6 @@ gst_tracers = library('gstcoretracers',
   include_directories : [configinc],
   dependencies : [gst_dep],
   install : true,
-  install_dir : '@0@/gstreamer-1.0'.format(get_option('libdir')),
+  install_dir : plugins_install_dir,
 )
-
+pkgconfig.generate(gst_tracers, install_dir : plugins_pkgconfig_install_dir)