meson: Generate a pkgconfig file for gstlibav
authorNirbheek Chauhan <nirbheek@centricular.com>
Tue, 9 Oct 2018 12:37:09 +0000 (18:07 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Tue, 9 Oct 2018 12:44:23 +0000 (18:14 +0530)
This matches all other plugins in the other gstreamer repos. This is
also necessary for generating the correct libtool archive (.la) files
in Cerbero which are needed for static linking on Android and iOS.

ext/libav/meson.build
meson.build

index b84c67b..f71aa2e 100644 (file)
@@ -13,7 +13,7 @@ sources = [
     'gstavdeinterlace.c',
 ]
 
-gstlibav = library('gstlibav',
+gstlibav_plugin = library('gstlibav',
     sources,
     c_args : gst_libav_args,
     include_directories : [configinc],
@@ -22,3 +22,4 @@ gstlibav = library('gstlibav',
     install : true,
     install_dir : plugins_install_dir,
   )
+pkgconfig.generate(gstlibav_plugin, install_dir : plugins_pkgconfig_install_dir)
index 2313358..35dc64b 100644 (file)
@@ -180,7 +180,13 @@ endforeach
 
 configinc = include_directories('.')
 plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))
-subdir('ext/libav/')
+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('ext/libav')
 
 python3 = import('python').find_installation()
 run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')