Can't build on MacOS ('SDL2/SDL.h' file not found)
I'm getting the following error on latest master (407c27db). I did the usual dance of cleaning everything and building from scratch but the problem persists.
ninja -C .
ninja: Entering directory `.'
[75/125] Compiling C object 'tools/tools@@dav1dplay@exe/dav1dplay.c.o'.
FAILED: tools/tools@@dav1dplay@exe/dav1dplay.c.o
cc -Itools/tools@@dav1dplay@exe -Itools -I../tools -I. -I../ -Iinclude/dav1d -I../include/dav1d -Iinclude -I../include -I/opt/local/include/SDL2 -Xclang -fcolor-diagnostics -DNDEBUG -pipe -Wall -Winvalid-pch -Wextra -std=c99 -O3 -D_POSIX_C_SOURCE=200112L -fvisibility=hidden -Wundef -Werror=vla -Wno-missing-field-initializers -Wno-unused-parameter -Werror=missing-prototypes -Wshorten-64-to-32 -fomit-frame-pointer -ffast-math -D_THREAD_SAFE -MD -MQ 'tools/tools@@dav1dplay@exe/dav1dplay.c.o' -MF 'tools/tools@@dav1dplay@exe/dav1dplay.c.o.d' -o 'tools/tools@@dav1dplay@exe/dav1dplay.c.o' -c ../tools/dav1dplay.c
../tools/dav1dplay.c:35:10: fatal error: 'SDL2/SDL.h' file not found
#include <SDL2/SDL.h>
^~~~~~~~~~~~
1 error generated.
[84/125] Generating 'src/src@@dav1d@sha/itx_ssse3.obj'.
ninja: build stopped: subcommand failed.
Here's the output of the meson build
The Meson build system
Version: 0.48.2
Source dir: <removed because i'm paranoid/>
Build dir: <removed because i'm paranoid/>
Build type: native build
Project name: dav1d
Project version: 0.3.1
Native C compiler: cc (clang 10.0.1 "Apple LLVM version 10.0.1 (clang-1001.0.46.4)")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Dependency threads found: YES
Check usable header "stdatomic.h": YES
Check usable header "unistd.h": YES
Check usable header "io.h": NO
Checking for function "getopt_long" : YES
Checking for function "posix_memalign" : YES
Compiler for C supports arguments -fvisibility=hidden: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Werror=vla: YES
Compiler for C supports arguments -Wno-maybe-uninitialized: NO
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -Werror=missing-prototypes: YES
Compiler for C supports arguments -Wshorten-64-to-32: YES
Compiler for C supports arguments -fomit-frame-pointer: YES
Compiler for C supports arguments -ffast-math: YES
Compiler for C supports arguments -mpreferred-stack-boundary=5: NO
Compiler for C supports arguments -mstack-alignment=32: YES
Configuring config.h using configuration
Configuring config.asm using configuration
Program nasm found: YES (/opt/local/bin/nasm)
Configuring version.h using configuration
Program doxygen found: NO
Checking for function "clock_gettime" : YES
Configuring cli_config.h using configuration
Found pkg-config: /opt/local/bin/pkg-config (0.29.2)
Dependency sdl2 found: YES 2.0.9
Dependency libplacebo found: NO (tried pkgconfig and framework)
Dependency vulkan found: NO (tried pkgconfig and system)
Has header "SDL_vulkan.h": YES
Library m found: YES
Program objcopy found: NO
Build targets in project: 12
Found ninja-1.8.2 at /opt/local/bin/ninja