mirror of
https://github.com/mpv-player/mpv
synced 2025-04-19 13:47:06 +00:00
build: allow to compile the cocoabasic.m example
This commit is contained in:
parent
d4d37245a6
commit
78c362bfb8
@ -507,11 +507,17 @@ def build(ctx):
|
|||||||
ctx.install_as(ctx.env.LIBDIR + '/pkgconfig/mpv.pc', 'libmpv/mpv.pc')
|
ctx.install_as(ctx.env.LIBDIR + '/pkgconfig/mpv.pc', 'libmpv/mpv.pc')
|
||||||
|
|
||||||
if ctx.dependency_satisfied('client-api-examples'):
|
if ctx.dependency_satisfied('client-api-examples'):
|
||||||
|
import os
|
||||||
# This assumes all examples are single-file (as examples should be)
|
# 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(
|
ctx(
|
||||||
target = f,
|
target = os.path.splitext(source)[0],
|
||||||
source = "DOCS/client_api_examples/" + f + ".c",
|
source = source,
|
||||||
includes = [ctx.bldnode.abspath(), ctx.srcnode.abspath()],
|
includes = [ctx.bldnode.abspath(), ctx.srcnode.abspath()],
|
||||||
use = "mpv",
|
use = "mpv",
|
||||||
features = "c cprogram",
|
features = "c cprogram",
|
||||||
|
Loading…
Reference in New Issue
Block a user