0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

build: allow to compile the cocoabasic.m example

This commit is contained in:
Stefano Pigozzi 2014-10-04 11:03:55 +02:00
parent d4d37245a6
commit 78c362bfb8

View File

@ -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",