leafo / magick

Lua bindings to ImageMagick for LuaJIT using FFI
401 stars 79 forks source link

Improve way to search for filters #18

Closed neoascetic closed 8 years ago

neoascetic commented 9 years ago

On my machine, resample.h file is in /usr/include/ImageMagic-6/magick directory:

root@281ff7a9897e:/home/openresty# find / -name 'resample.h'
/usr/include/ImageMagick-6/magick/resample.h

Here my output of command that get_flags function uses:

root@281ff7a9897e:/home/openresty# pkg-config --cflags --libs MagickWand
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/x86_64-linux-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -I/usr/include/x86_64-linux-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -lMagickWand-6.Q16 -lMagickCore-6.Q16

As you can see, required directory is the second, while only first include path is used by get_filters method. So it need to be improved to search for all include path and not only the first.