From a0ed62fc1d427bc02af8a2865d491ebde73ad2f0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 23 Jan 2015 15:32:23 +0100 Subject: build: remove bogus client API examples build The symlink trick made waf go crazy (deleting source files, getting tangled up in infinite recursion... I wish I was joking). This means we still can't build the client API examples in a reasonable way using the include files of the local repository (instead of globally installed headers). Not building them at all is better than deleting source files. Instead, provide some manual instructions how to build each example (except for the Qt examples, which provide qmake project files). --- DOCS/client_api_examples/README.md | 10 +++++----- DOCS/client_api_examples/cocoa/cocoabasic.m | 2 ++ DOCS/client_api_examples/simple/simple.c | 2 ++ wscript | 7 ------- wscript_build.py | 28 ---------------------------- 5 files changed, 9 insertions(+), 40 deletions(-) diff --git a/DOCS/client_api_examples/README.md b/DOCS/client_api_examples/README.md index 9de90a6748..1b6b40b082 100644 --- a/DOCS/client_api_examples/README.md +++ b/DOCS/client_api_examples/README.md @@ -8,6 +8,11 @@ cocoa Shows how to embed the mpv video window in Objective-C/Cocoa. +qt +-- + +Shows how to embed the mpv video window in Qt (using normal desktop widgets). + qml --- @@ -19,11 +24,6 @@ qml_direct Alternative example, which typically avoids a FBO indirection. Might be slightly faster, but is less flexible and harder to use. -qt --- - -Shows how to embed the mpv video window in Qt (using normal desktop widgets). - simple ------ diff --git a/DOCS/client_api_examples/cocoa/cocoabasic.m b/DOCS/client_api_examples/cocoa/cocoabasic.m index ea3e9c69d5..08c9b18e14 100644 --- a/DOCS/client_api_examples/cocoa/cocoabasic.m +++ b/DOCS/client_api_examples/cocoa/cocoabasic.m @@ -3,6 +3,8 @@ // but that's not quite ready yet. // You may need a basic Info.plist and MainMenu.xib to make this work. +// Build with: clang -o cocoabasic cocoabasic.m `pkg-config --libs --cflags mpv` + #include #include diff --git a/DOCS/client_api_examples/simple/simple.c b/DOCS/client_api_examples/simple/simple.c index ca8699a076..d18003dc2d 100644 --- a/DOCS/client_api_examples/simple/simple.c +++ b/DOCS/client_api_examples/simple/simple.c @@ -1,3 +1,5 @@ +// Build with: gcc -o simple simple.c `pkg-config --libs --cflags mpv` + #include #include #include diff --git a/wscript b/wscript index c8ab91ad83..dbe43127f7 100644 --- a/wscript +++ b/wscript @@ -25,13 +25,6 @@ build_options = [ 'default': 'disable', 'deps_neg': [ 'libmpv-shared' ], 'func': check_true - }, { - 'name': '--client-api-examples', - 'desc': 'build client API examples', - 'deps_any': [ 'libmpv-shared', 'libmpv-static' ], - # The build process uses symlinks (ln -s) - 'deps_neg': [ 'os-win32' ], - 'func': check_true }, { 'name': '--static-build', 'desc': 'static build', diff --git a/wscript_build.py b/wscript_build.py index 4146ca4576..e15b226b15 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -518,34 +518,6 @@ def build(ctx): ctx.install_as(ctx.env.LIBDIR + '/pkgconfig/mpv.pc', 'libmpv/mpv.pc') - if ctx.dependency_satisfied('client-api-examples'): - # This assumes all examples are single-file (as examples should be) - examples_sources = [ - ( "simple/simple.c" ), - ( "cocoa/cocoabasic.m", "cocoa" ), - ] - - # Create a "local" include dir, so we can build the examples without - # installing the headers. - incdir = os.path.join(ctx.bldnode.abspath(), "include") - ctx( - rule = "mkdir -p {1} && ln -s {0} {1}/mpv".format( - os.path.join(ctx.srcnode.abspath(), "libmpv"), incdir), - before = ("c",), - name = "incdir", - ) - - for source in ctx.filtered_sources(examples_sources): - ctx( - target = os.path.splitext(source)[0], - source = "DOCS/client_api_examples/" + source, - includes = [incdir, ctx.srcnode.abspath()], - use = "mpv incdir", - features = "c cprogram", - install_path = None - ) - ctx.env.CFLAGS += ['-isystem', incdir] - if ctx.dependency_satisfied("vf-dlopen-filters"): dlfilters = "telecine tile rectangle framestep ildetect".split() for dlfilter in dlfilters: -- cgit v1.2.3