SDL2_image 2.0.5 source failing to compile png module for android


#1

Tried compiling SDL2_image 2.0.5 for android using ndk 17 on mac (mojave).
the compilation fails at png.c (not finding zlib.h) tried including. stack trace below… please help

[armeabi-v7a] Compile thumb  : png <= png.c
In file included from /Users/panda/--/--/Android/app/jni/SDL2_image/external/libpng-1.6.37/png.c:14:
In file included from /Users/panda/--/--/Android/app/jni/SDL2_image/external/libpng-1.6.37/pngpriv.h:913:
/Users/panda/KilVish/--/Android/app/jni/SDL2_image/external/libpng-1.6.37/pngstruct.h:30:10: fatal error:
      'zlib.h' file not found
#include <zlib.h>
         ^~~~~~~~
1 error generated.
make: *** [/Users/panda/KilVish/BlockSipher/Android/app/obj/local/armeabi-v7a/objs/png/png.o] Error 1