summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2016-02-08 22:39:57 +0200
committerwm4 <wm4@nowhere>2016-02-10 21:29:44 +0100
commit8af71128028d76d070c238b905593c93d4a4336d (patch)
tree7e769ec3eb99712f9aaef5f42a5a91f23803112a
parent4b97869e5f8159bde598cbfc31f70ea3001d08df (diff)
downloadmpv-8af71128028d76d070c238b905593c93d4a4336d.tar.bz2
mpv-8af71128028d76d070c238b905593c93d4a4336d.tar.xz
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'.
-rw-r--r--wscript_build.py29
1 files 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: