Closed asonix closed 4 years ago
That certainly makes the compiler error go away, but is that appropriate for systems where a different quantum depth would have been the default? It seems that Magick++-config
will provide all of the necessary flags, so perhaps build.rs
should be modified to invoke this and set the result as the BINDGEN_EXTRA_CLANG_ARGS
environment variable. Maybe that will work, if clang accepts these arguments.
$ Magick++-config --cppflags
-Xpreprocessor -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -Xpreprocessor -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -Xpreprocessor -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/local/Cellar/imagemagick/7.0.10-34/include/ImageMagick-7
This may be difficult, but hard-coding the value to 8 is likely going to cause problems for others.
Thanks for the pointer, I'm working on that change now
I've updated the build.rs to apply the required compile flags, and tested it in my own program (compiling amd64 native, and cross-compiling for arm32v7 and arm64v8).
Thanks for addressing this, it should help a few people, it's come up before.
Add a define for setting quantum depth, fixing build errors with recent imagemagick versions
fixes https://github.com/nlfiedler/magick-rust/issues/70