diff --git a/libmpv/mpv.pc.in b/libmpv/mpv.pc.in new file mode 100644 index 0000000000..75f2869fc9 --- /dev/null +++ b/libmpv/mpv.pc.in @@ -0,0 +1,11 @@ +prefix=@PREFIX@ +exec_prefix=@PREFIX@ +libdir=@LIBDIR@ +includedir=@INCDIR@ + +Name: mpv +Description: mpv media player client library +Version: @VERSION@ +Requires: +Libs: -L${libdir} -lmpv +Cflags: -I${includedir} diff --git a/wscript_build.py b/wscript_build.py index 999a14495a..b83a8db4d2 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -451,10 +451,22 @@ def build(ctx): vnum = "0.0.0", ) + ctx( + target = 'libmpv/mpv.pc', + source = 'libmpv/mpv.pc.in', + features = 'subst', + PREFIX = ctx.env.PREFIX, + LIBDIR = ctx.env.LIBDIR, + INCDIR = ctx.env.INCDIR, + vnum = "0.0.0", + ) + headers = ["client.h"] for f in headers: ctx.install_as(ctx.env.INCDIR + '/libmpv/' + f, 'libmpv/' + f) + ctx.install_as(ctx.env.LIBDIR + '/pkgconfig/mpv.pc', 'libmpv/mpv.pc') + if ctx.dependency_satisfied('client-api-examples'): # This assumes all examples are single-file (as examples should be) for f in ["simple"]: