%-@GST_API_VERSION@.pc: %.pc
$(cp_verbose_0)cp $< $@
%-@GST_API_VERSION@-uninstalled.pc: %-uninstalled.pc
- $(cp_verbose_0)cp $< $@
+### the uninstalled libdir is depend of the build system used so set it here
+### rather than hardcoding it in the file directly.
+ $(AM_V_GEN) sed \
+ -e "s|[@]allocatorslibdir[@]|$(abs_top_builddir)/gst-libs/gst/allocators/.libs|" \
+ -e "s|[@]audiolibdir[@]|$(abs_top_builddir)/gst-libs/gst/audio/.libs|" \
+ -e "s|[@]applibdir[@]|$(abs_top_builddir)/gst-libs/gst/app/.libs|" \
+ -e "s|[@]fftlibdir[@]|$(abs_top_builddir)/gst-libs/gst/fft/.libs|" \
+ -e "s|[@]pbutilslibdir[@]|$(abs_top_builddir)/gst-libs/gst/pbutils/.libs|" \
+ -e "s|[@]rifflibdir[@]|$(abs_top_builddir)/gst-libs/gst/riff/.libs|" \
+ -e "s|[@]rtplibdir[@]|$(abs_top_builddir)/gst-libs/gst/rtp/.libs|" \
+ -e "s|[@]rtsplibdir[@]|$(abs_top_builddir)/gst-libs/gst/rtsp/.libs|" \
+ -e "s|[@]sdplibdir[@]|$(abs_top_builddir)/gst-libs/gst/sdp/.libs|" \
+ -e "s|[@]taglibdir[@]|$(abs_top_builddir)/gst-libs/gst/tag/.libs|" \
+ -e "s|[@]videolibdir[@]|$(abs_top_builddir)/gst-libs/gst/video/.libs|" \
+ $< > $@.tmp && mv $@.tmp $@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pcverfiles)
# the standard variables don't make sense for an uninstalled copy
prefix=
exec_prefix=
-libdir=@abs_top_builddir@/gst-libs/gst/allocators/.libs
+libdir=@allocatorslibdir@
# includedir is builddir because it is used to find gstconfig.h in places
includedir=@abs_top_builddir@/gst-libs
girdir=@abs_top_builddir@/gst-libs/gst/allocators
# the standard variables don't make sense for an uninstalled copy
prefix=
exec_prefix=
-libdir=@abs_top_builddir@/gst-libs/gst/app/.libs
+libdir=@applibdir@
# includedir is builddir because it is used to find gstconfig.h in places
includedir=@abs_top_builddir@/gst-libs
girdir=@abs_top_builddir@/gst-libs/gst/app
# the standard variables don't make sense for an uninstalled copy
prefix=
exec_prefix=
-libdir=@abs_top_builddir@/gst-libs/gst/audio/.libs
+libdir=@audiolibdir@
# includedir is builddir because it is used to find gstconfig.h in places
includedir=@abs_top_builddir@/gst-libs
girdir=@abs_top_builddir@/gst-libs/gst/audio
# the standard variables don't make sense for an uninstalled copy
prefix=
exec_prefix=
-libdir=@abs_top_builddir@/gst-libs/gst/fft/.libs
+libdir=@fftlibdir@
# includedir is builddir because it is used to find gstconfig.h in places
includedir=@abs_top_builddir@/gst-libs
girdir=@abs_top_builddir@/gst-libs/gst/fft
# the standard variables don't make sense for an uninstalled copy
prefix=
exec_prefix=
-libdir=@abs_top_builddir@/gst-libs/gst/pbutils/.libs
+libdir=@pbutilslibdir@
# includedir is builddir because it is used to find gstconfig.h in places
includedir=@abs_top_builddir@/gst-libs
girdir=@abs_top_builddir@/gst-libs/gst/pbutils
Description: Streaming media framework, base plugins libraries, uninstalled
Version: @VERSION@
Requires: gstreamer-@GST_API_VERSION@
-Libs: -L@abs_top_builddir@/gst-libs/gst/allocators/.libs -L@abs_top_builddir@/gst-libs/gst/app/.libs -L@abs_top_builddir@/gst-libs/gst/audio/.libs -L@abs_top_builddir@/gst-libs/gst/fft/.libs -L@abs_top_builddir@/gst-libs/gst/pbutils/.libs -L@abs_top_builddir@/gst-libs/gst/riff/.libs -L@abs_top_builddir@/gst-libs/gst/rtp/.libs -L@abs_top_builddir@/gst-libs/gst/rtsp/.libs -L@abs_top_builddir@/gst-libs/gst/sdp/.libs -L@abs_top_builddir@/gst-libs/gst/tag/.libs -L@abs_top_builddir@/gst-libs/gst/video/.libs
+Libs: -L@allocatorslibdir@ -L@applibdir@ -L@audiolibdir@ -L@fftlibdir@ -L@pbutilslibdir@ -L@rifflibdir@ -L@rtplibdir@ -L@rtsplibdir@ -L@sdplibdir@ -L@taglibdir@ -L@videolibdir@
Cflags: -I@abs_top_srcdir@/gst-libs -I@abs_top_builddir@/gst-libs
libraries=allocators app audio fft pbutils riff rtp rtsp sdp tag video
# the standard variables don't make sense for an uninstalled copy
prefix=
exec_prefix=
-libdir=@abs_top_builddir@/gst-libs/gst/riff/.libs
+libdir=@rifflibdir@
# includedir is builddir because it is used to find gstconfig.h in places
includedir=@abs_top_builddir@/gst-libs
girdir=@abs_top_builddir@/gst-libs/gst/riff
# the standard variables don't make sense for an uninstalled copy
prefix=
exec_prefix=
-libdir=@abs_top_builddir@/gst-libs/gst/rtp/.libs
+libdir=@rtplibdir@
# includedir is builddir because it is used to find gstconfig.h in places
includedir=@abs_top_builddir@/gst-libs
girdir=@abs_top_builddir@/gst-libs/gst/rtp
# the standard variables don't make sense for an uninstalled copy
prefix=
exec_prefix=
-libdir=@abs_top_builddir@/gst-libs/gst/rtsp/.libs
+libdir=@rtsplibdir@
# includedir is builddir because it is used to find gstconfig.h in places
includedir=@abs_top_builddir@/gst-libs
girdir=@abs_top_builddir@/gst-libs/gst/rtsp
# the standard variables don't make sense for an uninstalled copy
prefix=
exec_prefix=
-libdir=@abs_top_builddir@/gst-libs/gst/sdp/.libs
+libdir=@sdplibdir@
# includedir is builddir because it is used to find gstconfig.h in places
includedir=@abs_top_builddir@/gst-libs
girdir=@abs_top_builddir@/gst-libs/gst/sdp
# the standard variables don't make sense for an uninstalled copy
prefix=
exec_prefix=
-libdir=@abs_top_builddir@/gst-libs/gst/tag/.libs
+libdir=@taglibdir@
# includedir is builddir because it is used to find gstconfig.h in places
includedir=@abs_top_builddir@/gst-libs
girdir=@abs_top_builddir@/gst-libs/gst/tag
# the standard variables don't make sense for an uninstalled copy
prefix=
exec_prefix=
-libdir=@abs_top_builddir@/gst-libs/gst/video/.libs
+libdir=@videolibdir@
# includedir is builddir because it is used to find gstconfig.h in places
includedir=@abs_top_builddir@/gst-libs
girdir=@abs_top_builddir@/gst-libs/gst/video
pkgconf.set('GST_API_VERSION', api_version)
pkgconf.set('VERSION', gst_version)
+# needed for generating -uninstalled.pc files
+pkgconf.set('abs_top_builddir', join_paths(meson.current_build_dir(), '..'))
+pkgconf.set('abs_top_srcdir', join_paths(meson.current_source_dir(), '..'))
+pkgconf.set('allocatorslibdir', join_paths(meson.build_root(), gstallocators.outdir()))
+pkgconf.set('applibdir', join_paths(meson.build_root(), gstapp.outdir()))
+pkgconf.set('audiolibdir', join_paths(meson.build_root(), gstaudio.outdir()))
+pkgconf.set('fftlibdir', join_paths(meson.build_root(), gstfft.outdir()))
+pkgconf.set('pbutilslibdir', join_paths(meson.build_root(), pbutils.outdir()))
+pkgconf.set('rifflibdir', join_paths(meson.build_root(), gstriff.outdir()))
+pkgconf.set('rtplibdir', join_paths(meson.build_root(), gst_rtp.outdir()))
+pkgconf.set('rtsplibdir', join_paths(meson.build_root(), gst_rtsp.outdir()))
+pkgconf.set('sdplibdir', join_paths(meson.build_root(), gstsdp.outdir()))
+pkgconf.set('taglibdir', join_paths(meson.build_root(), gsttag.outdir()))
+pkgconf.set('videolibdir', join_paths(meson.build_root(), gstvideo.outdir()))
+
pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
pkg_files = [
output : outfile,
configuration : pkgconf,
install_dir : pkg_install_dir)
+
+ infile = p + '-uninstalled.pc.in'
+ outfile = p + '-1.0-uninstalled.pc'
+ configure_file(input : infile,
+ output : outfile,
+ configuration : pkgconf)
endforeach