meson: generate pkg-config -uninstalled pc files
[platform/upstream/gstreamer.git] / pkgconfig / Makefile.am
1
2 ### all of the standard pc files we need to generate
3 pcverfiles =  \
4         gstreamer-plugins-bad-@GST_API_VERSION@.pc \
5         gstreamer-codecparsers-@GST_API_VERSION@.pc \
6         gstreamer-insertbin-@GST_API_VERSION@.pc \
7         gstreamer-mpegts-@GST_API_VERSION@.pc \
8         gstreamer-player-@GST_API_VERSION@.pc \
9         gstreamer-bad-base-@GST_API_VERSION@.pc \
10         gstreamer-bad-audio-@GST_API_VERSION@.pc \
11         gstreamer-bad-video-@GST_API_VERSION@.pc
12
13 pcverfiles_uninstalled = \
14         gstreamer-plugins-bad-@GST_API_VERSION@-uninstalled.pc \
15         gstreamer-codecparsers-@GST_API_VERSION@-uninstalled.pc \
16         gstreamer-insertbin-@GST_API_VERSION@-uninstalled.pc \
17         gstreamer-mpegts-@GST_API_VERSION@-uninstalled.pc \
18         gstreamer-player-@GST_API_VERSION@-uninstalled.pc \
19         gstreamer-bad-base-@GST_API_VERSION@-uninstalled.pc \
20         gstreamer-bad-audio-@GST_API_VERSION@-uninstalled.pc \
21         gstreamer-bad-video-@GST_API_VERSION@-uninstalled.pc
22
23 if HAVE_GST_GL
24 pcverfiles += gstreamer-gl-@GST_API_VERSION@.pc
25 pcverfiles_uninstalled += gstreamer-gl-@GST_API_VERSION@-uninstalled.pc
26 endif
27
28 all-local: $(pcverfiles) $(pcverfiles_uninstalled)
29
30 cp_verbose = $(cp_verbose_$(V))
31 cp_verbose_ = $(cp_verbose_$(AM_DEFAULT_VERBOSITY))
32 cp_verbose_0 = @echo "  CP     $@";
33
34 ### how to generate versioned .pc files from .pc files in this dir
35 %-@GST_API_VERSION@.pc: %.pc
36         $(cp_verbose_0)cp $< $@
37 %-@GST_API_VERSION@-uninstalled.pc: %-uninstalled.pc
38 ### the uninstalled libdir is depend of the build system used so set it here
39 ### rather than hardcoding it in the file directly.
40         $(AM_V_GEN) sed \
41                 -e "s|[@]audiolibdir[@]|$(abs_top_builddir)/gst-libs/gst/audio/.libs|" \
42                 -e "s|[@]baselibdir[@]|$(abs_top_builddir)/gst-libs/gst/base/.libs|" \
43                 -e "s|[@]videolibdir[@]|$(abs_top_builddir)/gst-libs/gst/video/.libs|" \
44                 -e "s|[@]codecparserslibdir[@]|$(abs_top_builddir)/gst-libs/gst/codecparsers/.libs|" \
45                 -e "s|[@]gllibdir[@]|$(abs_top_builddir)/gst-libs/gst/gl/.libs|" \
46                 -e "s|[@]insertbinlibdir[@]|$(abs_top_builddir)/gst-libs/gst/insertbin/.libs|" \
47                 -e "s|[@]mpegtslibdir[@]|$(abs_top_builddir)/gst-libs/gst/mpegts/.libs|" \
48                 -e "s|[@]playerlibdir[@]|$(abs_top_builddir)/gst-libs/gst/player/.libs|" \
49                 -e "s|[@]waylandlibdir[@]|$(abs_top_builddir)/gst-libs/gst/wayland/.libs|" \
50                 -e "s|[@]basecamerabinsrclibdir[@]|$(abs_top_builddir)/gst-libs/gst/basecamerabinsrc/.libs|" \
51                 -e "s|[@]photographylibdir[@]|$(abs_top_builddir)/gst-libs/gst/interfaces/.libs|" \
52                 $< > $@.tmp && mv $@.tmp $@
53
54 pkgconfigdir = $(libdir)/pkgconfig
55 pkgconfig_DATA = $(pcverfiles)
56
57 CLEANFILES = $(pcverfiles) $(pcverfiles_uninstalled)
58 pcinfiles = \
59            gstreamer-plugins-bad.pc.in gstreamer-plugins-bad-uninstalled.pc.in \
60            gstreamer-codecparsers.pc.in gstreamer-codecparsers-uninstalled.pc.in \
61            gstreamer-gl.pc.in gstreamer-gl-uninstalled.pc.in \
62            gstreamer-insertbin.pc.in gstreamer-insertbin-uninstalled.pc.in \
63            gstreamer-mpegts.pc.in gstreamer-mpegts-uninstalled.pc.in \
64            gstreamer-player.pc.in gstreamer-player-uninstalled.pc.in \
65            gstreamer-bad-audio.pc.in gstreamer-bad-audio-uninstalled.pc.in \
66            gstreamer-bad-video.pc.in gstreamer-bad-video-uninstalled.pc.in \
67            gstreamer-bad-base.pc.in gstreamer-bad-base-uninstalled.pc.in
68
69 DISTCLEANFILES = $(pcinfiles:.in=)
70 EXTRA_DIST = $(pcinfiles)