From 04416c4b647d06352cbcf59f83096b7ac8ac4d32 Mon Sep 17 00:00:00 2001
From: Julien Malik <julien.malik@c-s.fr>
Date: Fri, 25 Nov 2011 17:28:35 +0100
Subject: [PATCH] COMP: avoid adding a compile time definition, use
 otbConfigure.h instead

---
 CMake/ImportJPEG2000.cmake | 1 -
 CMake/otbConfigure.h.in    | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/CMake/ImportJPEG2000.cmake b/CMake/ImportJPEG2000.cmake
index ed0a12d574..4224cf12b2 100644
--- a/CMake/ImportJPEG2000.cmake
+++ b/CMake/ImportJPEG2000.cmake
@@ -12,7 +12,6 @@ IF(OTB_USE_JPEG2000)
  SET(OPJ_MANGLE_PREFIX "otbopenjpeg")
  SET(OPENJPEG_INSTALL_LIB_DIR ${OTB_INSTALL_LIB_DIR_CM24})
 
-  ADD_DEFINITIONS(-DOTB_USE_JPEG2000)
   IF(NOT BUILD_SHARED_LIBS)
         ADD_DEFINITIONS(-DOPJ_STATIC)
   ENDIF(NOT BUILD_SHARED_LIBS)
diff --git a/CMake/otbConfigure.h.in b/CMake/otbConfigure.h.in
index d18640333d..bf03b25137 100644
--- a/CMake/otbConfigure.h.in
+++ b/CMake/otbConfigure.h.in
@@ -62,6 +62,9 @@
 #cmakedefine OTB_USE_CURL
 #cmakedefine OTB_CURL_MULTI_AVAILABLE
 
+/* Curl */
+#cmakedefine OTB_USE_JPEG2000
+
 /* Use Visu/Gui configurations */
 #cmakedefine OTB_USE_VISU_GUI
 
-- 
GitLab