--- src/CMakeLists.txt.orig 2020-04-15 07:10:53 UTC +++ src/CMakeLists.txt @@ -360,7 +360,7 @@ if(USE_OPENJPEG) add_definitions("-DHAVE_OPENJPEG") list(APPEND SOURCES "common/imageio_j2k.c") - include_directories(SYSTEM ${OpenJPEG_INCLUDE_DIRS}) + include_directories(BEFORE SYSTEM ${OpenJPEG_INCLUDE_DIRS}) list(APPEND LIBS ${OpenJPEG_LIBRARIES}) endif(OpenJPEG_FOUND) endif(USE_OPENJPEG)