1 pkgconf = configuration_data()
3 pkgconf.set('prefix', join_paths(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', api_version)
8 pkgconf.set('VERSION', gst_version)
9 pkgconf.set('LIBM', libm.found() ? '-lm' : '')
10 pkgconf.set('ZLIB_LIBS', zlib_dep.found() ? '-lz' : '')
11 pkgconf.set('ORC_PC', have_orcc ? 'orc-0.4' : '')
13 # needed for generating -uninstalled.pc files
14 pkgconf.set('abs_top_builddir', join_paths(meson.current_build_dir(), '..'))
15 pkgconf.set('abs_top_srcdir', join_paths(meson.current_source_dir(), '..'))
16 pkgconf.set('allocatorslibdir', join_paths(meson.build_root(), gstallocators.outdir()))
17 pkgconf.set('applibdir', join_paths(meson.build_root(), gstapp.outdir()))
18 pkgconf.set('audiolibdir', join_paths(meson.build_root(), gstaudio.outdir()))
19 pkgconf.set('fftlibdir', join_paths(meson.build_root(), gstfft.outdir()))
20 pkgconf.set('pbutilslibdir', join_paths(meson.build_root(), pbutils.outdir()))
21 pkgconf.set('rifflibdir', join_paths(meson.build_root(), gstriff.outdir()))
22 pkgconf.set('rtplibdir', join_paths(meson.build_root(), gst_rtp.outdir()))
23 pkgconf.set('rtsplibdir', join_paths(meson.build_root(), gst_rtsp.outdir()))
24 pkgconf.set('sdplibdir', join_paths(meson.build_root(), gstsdp.outdir()))
25 pkgconf.set('taglibdir', join_paths(meson.build_root(), gsttag.outdir()))
26 pkgconf.set('videolibdir', join_paths(meson.build_root(), gstvideo.outdir()))
28 pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
31 'gstreamer-allocators',
36 'gstreamer-plugins-base',
45 # XXX: requires the meson.build to be parsed/executed after gst-libs/gl/meson.build
47 gllibdir = join_paths(meson.build_root(), gstgl.outdir())
48 pkgconf.set('gllibdir', gllibdir)
49 pkgconf.set('glliblinkerflag', '-L' + gllibdir)
50 pkg_files += ['gstreamer-gl', 'gstreamer-gl-prototypes']
51 pkgconf.set('GL_APIS', ' '.join(enabled_gl_apis))
52 pkgconf.set('GL_WINDOWS', ' '.join(enabled_gl_winsys))
53 pkgconf.set('GL_PLATFORMS', ' '.join(enabled_gl_platforms))
54 pkgconf.set('gl_lib_name', 'gl')
55 gl_proto_requires = ''
57 if enabled_gl_apis.contains('gl')
58 if gl_dep.type_name() == 'pkgconfig'
59 gl_proto_requires += ' gl'
60 elif gl_dep.type_name() == 'library'
61 if 'wgl' in enabled_gl_platforms
62 gl_proto_libs += ' -lopengl32'
64 gl_proto_libs += ' -lGL'
66 elif gl_dep.type_name() == 'appleframework'
67 gl_proto_libs += ' -framework OpenGL'
70 if enabled_gl_apis.contains('gles2')
71 if gles2_dep.type_name() == 'pkgconfig'
72 gl_proto_requires += ' glesv2'
73 elif gles2_dep.type_name() == 'library'
74 gl_proto_libs += ' -lGLESv2'
75 elif gles2_dep.type_name() == 'appleframework'
76 gl_proto_libs += ' -framework OpenGLES'
79 pkgconf.set('GL_PROTO_EXTRA_REQUIRES', gl_proto_requires)
80 pkgconf.set('GL_PROTO_EXTRA_LIBS', gl_proto_libs)
81 if enabled_gl_platforms.contains('egl')
82 pkg_files += ['gstreamer-gl-egl']
83 if egl_dep.type_name() == 'pkgconfig'
84 pkgconf.set('GL_EGL_EXTRA_REQUIRES', 'egl')
85 pkgconf.set('GL_EGL_EXTRA_LIBS', '')
86 elif egl_dep.type_name() == 'library'
87 pkgconf.set('GL_EGL_EXTRA_REQUIRES', '')
88 pkgconf.set('GL_EGL_EXTRA_LIBS', '-lEGL')
91 if enabled_gl_winsys.contains('x11')
92 pkg_files += ['gstreamer-gl-x11']
94 if enabled_gl_winsys.contains('wayland')
95 pkg_files += ['gstreamer-gl-wayland']
98 pkgconf.set('glliblinkerflag', '')
99 pkgconf.set('gl_lib_name', '')
102 foreach p : pkg_files
103 infile = p + '.pc.in'
104 outfile = p + '-1.0.pc'
105 configure_file(input : infile,
107 configuration : pkgconf,
108 install_dir : pkg_install_dir)
110 infile = p + '-uninstalled.pc.in'
111 outfile = p + '-1.0-uninstalled.pc'
112 configure_file(input : infile,
114 configuration : pkgconf)