From 66e39ad3e87eb6bed44faecb22900865bf3db000 Mon Sep 17 00:00:00 2001 From: shahramn Date: Wed, 28 Feb 2024 19:35:25 +0000 Subject: [PATCH] Openjpeg 2.5.1: Try again --- bamboo/flags.cmake | 2 +- src/grib_openjpeg_encoding.cc | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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) {