summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2012-01-27 00:36:18 +0100
committerAlbert Astals Cid <aacid@kde.org>2012-01-27 00:43:21 +0100
commitcbe7131e63c5896010e7e1ad5c0c3aa91611704d (patch)
tree2329ff596ceb19e898bce3980ad3b2206cabdf6a /cmake
parent641526d1a7e8032ea8f7b8ac42c5ad8c20448d9b (diff)
Set OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG if you have it
Fixes/workarounds bug 43414 with openjpeg 1.5 (unreleased) (cherry picked from commit de6415af1a39ec7dfa4f149c6c5e311b86352cec)
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)