From 8af71128028d76d070c238b905593c93d4a4336d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= Date: Mon, 8 Feb 2016 22:39:57 +0200 Subject: wscript_build: disable SONAME generation when building for Android Android is well-known for not supporting SONAME'd libraries. All libraries imported into an APK have to end with '.so'. --- wscript_build.py | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/wscript_build.py b/wscript_build.py index af88977b2b..090ac96181 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -491,17 +491,24 @@ def build(ctx): features += "cshlib syms" else: features += "cstlib" - ctx( - target = "mpv", - source = ctx.filtered_sources(sources), - use = ctx.dependencies_use(), - includes = [ctx.bldnode.abspath(), ctx.srcnode.abspath()] + \ - ctx.dependencies_includes(), - features = features, - export_symbols_def = "libmpv/mpv.def", - install_path = ctx.env.LIBDIR, - vnum = libversion, - ) + + libmpv_kwargs = { + "target": "mpv", + "source": ctx.filtered_sources(sources), + "use": ctx.dependencies_use(), + "includes": [ctx.bldnode.abspath(), ctx.srcnode.abspath()] + \ + ctx.dependencies_includes(), + "features": features, + "export_symbols_def": "libmpv/mpv.def", + "install_path": ctx.env.LIBDIR, + } + + if not ctx.dependency_satisfied('android'): + # for all other configurations we want SONAME to be used + libmpv_kwargs["vnum"] = libversion + + ctx(**libmpv_kwargs) + if build_shared: _build_libmpv(True) if build_static: -- cgit v1.2.3