diff --git a/libmpv/mpv.pc.in b/libmpv/mpv.pc.in index 75f2869fc9..56863439ae 100644 --- a/libmpv/mpv.pc.in +++ b/libmpv/mpv.pc.in @@ -8,4 +8,5 @@ Description: mpv media player client library Version: @VERSION@ Requires: Libs: -L${libdir} -lmpv +Libs.private: @PRIV_LIBS@ Cflags: -I${includedir} diff --git a/wscript_build.py b/wscript_build.py index 8825f15b6f..090fe280ca 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -479,6 +479,13 @@ def build(ctx): if build_static: _build_libmpv(False) + def get_deps(): + res = "" + for k in ctx.env.keys(): + if k.startswith("LIB_") and k != "LIB_ST": + res += " ".join(["-l" + x for x in ctx.env[k]]) + " " + return res + ctx( target = 'libmpv/mpv.pc', source = 'libmpv/mpv.pc.in', @@ -487,6 +494,7 @@ def build(ctx): LIBDIR = ctx.env.LIBDIR, INCDIR = ctx.env.INCDIR, VERSION = libversion, + PRIV_LIBS = get_deps(), ) headers = ["client.h"]