From 78c362bfb8bcc6972ea9a21a3b602a070584bba4 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 4 Oct 2014 11:03:55 +0200 Subject: build: allow to compile the cocoabasic.m example --- wscript_build.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wscript_build.py b/wscript_build.py index c8dc6a42f1..7a56c16647 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -507,11 +507,17 @@ def build(ctx): ctx.install_as(ctx.env.LIBDIR + '/pkgconfig/mpv.pc', 'libmpv/mpv.pc') if ctx.dependency_satisfied('client-api-examples'): + import os # This assumes all examples are single-file (as examples should be) - for f in ["simple"]: + examples_sources = [ + ( "DOCS/client_api_examples/simple.c" ), + ( "DOCS/client_api_examples/cocoabasic.m", "cocoa" ), + ] + + for source in ctx.filtered_sources(examples_sources): ctx( - target = f, - source = "DOCS/client_api_examples/" + f + ".c", + target = os.path.splitext(source)[0], + source = source, includes = [ctx.bldnode.abspath(), ctx.srcnode.abspath()], use = "mpv", features = "c cprogram", -- cgit v1.2.3