The problem is that the include path already contains the SDL2 directory.
ninja: Entering directory `build'
[2/4] Compiling C++ object 'examples/examples@@animation@exe/animation.cpp.o'.
FAILED: examples/examples@@animation@exe/animation.cpp.o
c++ -Iexamples/examples@@animation@exe -Iexamples -I../examples -I. -I../ -I/opt/local/include/SDL2 -flto -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++11 -g -D_THREAD_SAFE -MD -MQ 'examples/examples@@animation@exe/animation.cpp.o' -MF 'examples/examples@@animation@exe/animation.cpp.o.d' -o 'examples/examples@@animation@exe/animation.cpp.o' -c ../examples/animation.cpp
../examples/animation.cpp:1:10: fatal error: 'SDL2/SDL.h' file not found
#include <SDL2/SDL.h>