summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindLIBOPENJPEG.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmake/modules/FindLIBOPENJPEG.cmake b/cmake/modules/FindLIBOPENJPEG.cmake
index 978ee7d9..ab1721d9 100644
--- a/cmake/modules/FindLIBOPENJPEG.cmake
+++ b/cmake/modules/FindLIBOPENJPEG.cmake
@@ -26,6 +26,19 @@ else (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
find_path (LIBOPENJPEG_INCLUDE_DIR openjpeg.h PATH_SUFFIXES openjpeg)
find_library(LIBOPENJPEG_LIBRARIES openjpeg)
if(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
+
+ set(CMAKE_REQUIRED_INCLUDES ${LIBOPENJPEG_INCLUDE_DIR})
+ set(CMAKE_REQUIRED_LIBRARIES ${LIBOPENJPEG_LIBRARIES})
+
+check_cxx_source_compiles("
+#include <openjpeg.h>
+int main()
+{
+ int foo = OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG;
+ return 0;
+}
+" WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG)
+
set(LIBOPENJPEG_FOUND TRUE)
endif(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)