cloudinary / ssimulacra2

SSIMULACRA 2. Perceptual metric.
BSD 3-Clause "New" or "Revised" License
161 stars 5 forks source link

Fix macOS build #1

Closed dloebl closed 1 year ago

dloebl commented 2 years ago

I noticed two issues when building the ssimulacra2 executable on my macOS 12.6 machine via ./build_ssimulacra:

[10/54] Building CXX object lib/CMakeFiles/jxl_dec-obj.dir/jxl/dec_external_image.cc.o
FAILED: lib/CMakeFiles/jxl_dec-obj.dir/jxl/dec_external_image.cc.o
[..]
/Users/dbl/src/github.com/cloudinary/ssimulacra2/src/lib/jxl/base/status.h:279:3: error: unknown type name 'constexpr'

Fixed by setting CMAKE_CXX_STANDARD (a7a6adb6a8129c5b37b51ef97b80b659c47e22ad).

[22/54] Building CXX object lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_color_management.cc.o
FAILED: lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_color_management.cc.o 
[..]
/Users/dbl/src/github.com/cloudinary/ssimulacra2/src/lib/jxl/enc_color_management.cc:39:10: fatal error: 'lcms2.h' file not found
#include "lcms2.h"
         ^~~~~~~~~
1 error generated.

Looks like the include dir for the lcms2 Homebrew package isn't added. Fixed with 4afe13580e7fef313b4912594d6d23dabb702cdb.

jonsneyers commented 1 year ago

Thanks!