meson: pkgconfig: add libunwind/libdw to gstreamer-1.0 Requires.private
[platform/upstream/gstreamer.git] / pkgconfig / meson.build
1 pkgconf = configuration_data()
2
3 pkgconf.set('prefix', get_option('prefix'))
4 pkgconf.set('exec_prefix', '${prefix}')
5 pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
6 pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
7 pkgconf.set('GST_API_VERSION', apiversion)
8 pkgconf.set('VERSION', gst_version)
9
10 # Requires.private
11 pkgconf.set('UNWIND_REQUIRE', cdata.has('HAVE_UNWIND') ? 'libunwind' : '')
12 pkgconf.set('DW_REQUIRE', cdata.has('HAVE_DW') ? 'libdw' : '')
13
14 # needed for generating -uninstalled.pc files
15 pkgconf.set('abs_top_builddir', join_paths(meson.current_build_dir(), '..'))
16 pkgconf.set('abs_top_srcdir', join_paths(meson.current_source_dir(), '..'))
17 pkgconf.set('gstlibdir', join_paths(meson.build_root(), libgst.outdir()))
18 pkgconf.set('baselibdir', join_paths(meson.build_root(), gst_base.outdir()))
19 pkgconf.set('controllerlibdir', join_paths(meson.build_root(), gst_controller.outdir()))
20 pkgconf.set('netlibdir', join_paths(meson.build_root(), gst_net.outdir()))
21
22 pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
23
24 pkg_files = ['gstreamer-base',
25   'gstreamer-controller',
26   'gstreamer-net',
27   'gstreamer'
28 ]
29
30 if host_machine.system() != 'windows'
31     pkgconf.set('checklibdir', join_paths(meson.build_root(), gst_check.outdir()))
32     pkg_files += ['gstreamer-check']
33 endif
34
35 foreach p : pkg_files
36   infile = p + '.pc.in'
37   outfile = p + '-1.0.pc'
38   configure_file(input : infile,
39     output : outfile,
40     configuration : pkgconf,
41     install_dir : pkg_install_dir)
42
43   infile = p + '-uninstalled.pc.in'
44   outfile = p + '-1.0-uninstalled.pc'
45   configure_file(input : infile,
46     output : outfile,
47     configuration : pkgconf)
48 endforeach