shithub: dav1d

Download patch

ref: 502204562c7458d42812dcf5c32b0cbc28150c25
parent: 115fe773fe0e266a0918fbb950e1acfa5ee2b0bd
author: Xavier Claessens <xavier.claessens@collabora.com>
date: Mon Dec 30 14:58:14 EST 2019

Fix building as a meson subproject

- When building dav1d as a dependency fallback, the parent project needs
to provide the variable name of a dependency object, added dav1d_dep for
that.
- SOURCE_ROOT is the root of the main project source tree, use
current_source_dir() instead.

--- a/meson.build
+++ b/meson.build
@@ -401,7 +401,7 @@
         depfile: '@BASENAME@.obj.ndep',
         arguments: [
             '-f', nasm_format,
-            '-I', '@SOURCE_DIR@/src/',
+            '-I', '@0@/src/'.format(meson.current_source_dir()),
             '-I', '@0@/'.format(meson.current_build_dir()),
             '-MQ', '@OUTPUT@', '-MF', '@DEPFILE@',
             '@EXTRA_ARGS@',
--- a/src/meson.build
+++ b/src/meson.build
@@ -287,6 +287,10 @@
     install : true,
 )
 
+dav1d_dep = declare_dependency(link_with: libdav1d,
+    include_directories : include_directories('../include/dav1d')
+)
+
 #
 # Generate pkg-config .pc file
 #