diff --git a/bamboo/flags.cmake b/bamboo/flags.cmake index 4c4a1ede8..832133409 100644 --- a/bamboo/flags.cmake +++ b/bamboo/flags.cmake @@ -1,4 +1,4 @@ SET(ENABLE_EXTRA_TESTS ON CACHE BOOL "Enable extra tests") SET(ENABLE_ECCODES_THREADS ON CACHE BOOL "Enable POSIX threads") SET(ENABLE_MEMFS ON CACHE BOOL "Enable MEMFS") -SET(ENABLE_JPG_LIBOPENJPEG OFF CACHE BOOL "Disable OpenJPEG") +# SET(ENABLE_JPG_LIBOPENJPEG OFF CACHE BOOL "Disable OpenJPEG") diff --git a/src/grib_openjpeg_encoding.cc b/src/grib_openjpeg_encoding.cc index 381e36c22..9b3b67566 100644 --- a/src/grib_openjpeg_encoding.cc +++ b/src/grib_openjpeg_encoding.cc @@ -13,7 +13,11 @@ #if HAVE_LIBOPENJPEG #include "openjpeg.h" -#include "opj_config.h" +// The older versions did not have the opj_config.h file +// So we use a more recent macro to detect whether it is there +#if defined(OPJ_IMG_INFO) + #include "opj_config.h" +#endif static void openjpeg_warning(const char* msg, void* client_data) {