diff -u CMakeLists.txt.orig CMakeLists.txt --- CMakeLists.txt.orig +++ CMakeLists.txt @@ -141,6 +141,17 @@ set(HAVE_LIBJP2K 1) endif() endif() + if(NOT JP2K) + find_path(JP2K_INCLUDE_DIR /openjpeg-2.5/openjpeg.h) + find_library(JP2K_LIBRARY NAMES openjp2) + if (JP2K_INCLUDE_DIR AND JP2K_LIBRARY) + set(JP2K 1) + set(JP2K_FOUND TRUE) + set(JP2K_LIBRARIES ${JP2K_LIBRARY}) + set(JP2K_INCLUDE_DIRS ${JP2K_INCLUDE_DIR}) + set(HAVE_LIBJP2K 1) + endif() + endif() set(libs_private "${libs_private} -lopenjp2") endif() endif() diff -u cmake/Configure.cmake.orig cmake/Configure.cmake --- cmake/Configure.cmake.orig +++ cmake/Configure.cmake @@ -69,6 +69,7 @@ openjpeg-2.2/openjpeg.h openjpeg-2.3/openjpeg.h openjpeg-2.4/openjpeg.h + openjpeg-2.5/openjpeg.h ) check_includes(include_files_list) @@ -146,7 +147,9 @@ /* Define to 1 if you have zlib. */ #cmakedefine HAVE_LIBZ 1 -#if defined(HAVE_OPENJPEG_2_4_OPENJPEG_H) +#if defined(HAVE_OPENJPEG_2_5_OPENJPEG_H) +#define LIBJP2K_HEADER +#elif defined(HAVE_OPENJPEG_2_4_OPENJPEG_H) #define LIBJP2K_HEADER #elif defined(HAVE_OPENJPEG_2_3_OPENJPEG_H) #define LIBJP2K_HEADER diff -u config/config.h.in.orig config/config.h.in --- config/config.h.in.orig +++ config/config.h.in @@ -51,6 +51,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OPENJPEG_2_3_OPENJPEG_H +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENJPEG_2_4_OPENJPEG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENJPEG_2_5_OPENJPEG_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H