From 4f7d4a62bff97a45a1ccf3025b76857e2f2d4eb0 Mon Sep 17 00:00:00 2001
From: Julien Malik <julien.malik@c-s.fr>
Date: Tue, 13 Mar 2012 15:31:40 +0100
Subject: [PATCH] ENH: prefix ossim include with ossim dir

---
 Testing/Code/IO/otbImageKeywordlist.cxx                  | 9 +++++----
 Testing/Code/IO/otbOssimJpegFileRessourceLeakTest.cxx    | 7 ++++---
 Testing/Code/Projections/CMakeLists.txt                  | 7 +++++++
 .../Code/Projections/otbCreateProjectionWithOSSIM.cxx    | 8 ++++----
 Testing/Code/Projections/otbCreateProjectionWithOTB.cxx  | 8 ++++----
 Testing/Code/Projections/otbOssimElevManagerTest.cxx     | 4 ++--
 Testing/Code/Projections/otbOssimElevManagerTest2.cxx    | 5 +++--
 Testing/Code/Projections/otbOssimElevManagerTest4.cxx    | 4 ++--
 8 files changed, 31 insertions(+), 21 deletions(-)

diff --git a/Testing/Code/IO/otbImageKeywordlist.cxx b/Testing/Code/IO/otbImageKeywordlist.cxx
index c2dc82fe1d..c220934248 100644
--- a/Testing/Code/IO/otbImageKeywordlist.cxx
+++ b/Testing/Code/IO/otbImageKeywordlist.cxx
@@ -23,11 +23,12 @@
 #include "otbMacro.h"
 #include "otbImageKeywordlist.h"
 
-#include "base/ossimKeywordlist.h"
-#include "projection/ossimProjection.h"
-#include "projection/ossimProjectionFactoryRegistry.h"
+#include "ossim/base/ossimKeywordlist.h"
+#include "ossim/projection/ossimProjection.h"
+#include "ossim/projection/ossimProjectionFactoryRegistry.h"
+#include "ossim/base/ossimFilename.h"
+
 #include "ossim/ossimPluginProjectionFactory.h"
-#include "base/ossimFilename.h"
 
 int otbImageKeywordlist(int argc, char* argv[])
 {
diff --git a/Testing/Code/IO/otbOssimJpegFileRessourceLeakTest.cxx b/Testing/Code/IO/otbOssimJpegFileRessourceLeakTest.cxx
index 5163cd4683..43764790e7 100644
--- a/Testing/Code/IO/otbOssimJpegFileRessourceLeakTest.cxx
+++ b/Testing/Code/IO/otbOssimJpegFileRessourceLeakTest.cxx
@@ -15,12 +15,13 @@
   PURPOSE.  See the above copyright notices for more information.
 
 =========================================================================*/
-#include <imaging/ossimImageHandler.h>
-#include <imaging/ossimImageHandlerRegistry.h>
-#include <base/ossimFilename.h>
 #include <stdlib.h>
 #include <iostream>
 
+#include <ossim/imaging/ossimImageHandler.h>
+#include <ossim/imaging/ossimImageHandlerRegistry.h>
+#include <ossim/base/ossimFilename.h>
+
 // This test demonstrate that handler->close() does not release the file descriptor for jpeg files.
 
 int otbOssimJpegFileRessourceLeakTest(int argc, char * argv[])
diff --git a/Testing/Code/Projections/CMakeLists.txt b/Testing/Code/Projections/CMakeLists.txt
index dc0af32a6f..d55dbf55cd 100644
--- a/Testing/Code/Projections/CMakeLists.txt
+++ b/Testing/Code/Projections/CMakeLists.txt
@@ -1642,6 +1642,13 @@ otbCreateProjectionWithOTB.cxx
 )
 ENDIF(NOT OTB_TESTING_STANDALONE)
 
+IF(OTB_USE_EXTERNAL_OSSIM)
+  INCLUDE_DIRECTORIES( ${OSSIM_INCLUDE_DIR} )
+ELSE(OTB_USE_EXTERNAL_OSSIM)
+  INCLUDE_DIRECTORIES( ${OTB_SOURCE_DIR}/Utilities/otbossim/include
+                       ${OTB_BINARY_DIR}/Utilities/otbossim/include )
+ENDIF(OTB_USE_EXTERNAL_OSSIM)
+
 OTB_ADD_EXECUTABLE(otbProjectionsTests1 "${Projections_SRCS1}" "OTBProjections;OTBIO;OTBTesting")
 OTB_ADD_EXECUTABLE(otbProjectionsTests2 "${Projections_SRCS2}" "OTBProjections;OTBIO;OTBTesting")
 OTB_ADD_EXECUTABLE(otbProjectionsTests3 "${Projections_SRCS3}" "OTBProjections;OTBIO;OTBTesting")
diff --git a/Testing/Code/Projections/otbCreateProjectionWithOSSIM.cxx b/Testing/Code/Projections/otbCreateProjectionWithOSSIM.cxx
index b2a4234299..daac8d0c78 100644
--- a/Testing/Code/Projections/otbCreateProjectionWithOSSIM.cxx
+++ b/Testing/Code/Projections/otbCreateProjectionWithOSSIM.cxx
@@ -45,10 +45,10 @@
 
 #include "otbInverseSensorModel.h"
 
-#include "imaging/ossimImageHandler.h"
-#include "base/ossimKeywordlist.h"
-#include "imaging/ossimImageHandlerRegistry.h"
-#include "projection/ossimProjectionFactoryRegistry.h"
+#include "ossim/imaging/ossimImageHandler.h"
+#include "ossim/base/ossimKeywordlist.h"
+#include "ossim/imaging/ossimImageHandlerRegistry.h"
+#include "ossim/projection/ossimProjectionFactoryRegistry.h"
 
 int otbCreateProjectionWithOSSIM(int argc, char* argv[])
 {
diff --git a/Testing/Code/Projections/otbCreateProjectionWithOTB.cxx b/Testing/Code/Projections/otbCreateProjectionWithOTB.cxx
index 85e402b9ec..11ca71ec52 100644
--- a/Testing/Code/Projections/otbCreateProjectionWithOTB.cxx
+++ b/Testing/Code/Projections/otbCreateProjectionWithOTB.cxx
@@ -45,10 +45,10 @@
 
 #include "otbInverseSensorModel.h"
 
-#include "base/ossimKeywordlist.h"
-#include "base/ossimGpt.h"
-#include "projection/ossimProjectionFactoryRegistry.h"
-#include "imaging/ossimImageHandlerRegistry.h"
+#include "ossim/base/ossimKeywordlist.h"
+#include "ossim/base/ossimGpt.h"
+#include "ossim/projection/ossimProjectionFactoryRegistry.h"
+#include "ossim/imaging/ossimImageHandlerRegistry.h"
 
 int otbCreateProjectionWithOTB(int argc, char* argv[])
 {
diff --git a/Testing/Code/Projections/otbOssimElevManagerTest.cxx b/Testing/Code/Projections/otbOssimElevManagerTest.cxx
index 44df7e0222..caaf8ccffc 100644
--- a/Testing/Code/Projections/otbOssimElevManagerTest.cxx
+++ b/Testing/Code/Projections/otbOssimElevManagerTest.cxx
@@ -14,11 +14,11 @@
   PURPOSE.  See the above copyright notices for more information.
 
 =========================================================================*/
+#include "ossim/elevation/ossimElevManager.h"
+#include "ossim/base/ossimFilename.h"
 
 #include "otbImage.h"
 #include "otbImageFileWriter.h"
-#include "elevation/ossimElevManager.h"
-#include "base/ossimFilename.h"
 #include "itkImageRegionIteratorWithIndex.h"
 
 int otbOssimElevManagerTest(int argc, char* argv[])
diff --git a/Testing/Code/Projections/otbOssimElevManagerTest2.cxx b/Testing/Code/Projections/otbOssimElevManagerTest2.cxx
index f8ef7236a3..93a0baa468 100644
--- a/Testing/Code/Projections/otbOssimElevManagerTest2.cxx
+++ b/Testing/Code/Projections/otbOssimElevManagerTest2.cxx
@@ -19,8 +19,9 @@
 #include <fstream>
 #include <cstdlib>
 
-#include "elevation/ossimElevManager.h"
-#include "base/ossimFilename.h"
+#include "ossim/elevation/ossimElevManager.h"
+#include "ossim/base/ossimFilename.h"
+
 #include "itkPoint.h"
 
 int otbOssimElevManagerTest2(int argc, char* argv[])
diff --git a/Testing/Code/Projections/otbOssimElevManagerTest4.cxx b/Testing/Code/Projections/otbOssimElevManagerTest4.cxx
index 46212a8775..3ae4b62037 100644
--- a/Testing/Code/Projections/otbOssimElevManagerTest4.cxx
+++ b/Testing/Code/Projections/otbOssimElevManagerTest4.cxx
@@ -20,8 +20,8 @@
 #include <fstream>
 #include <sstream>
 
-#include "elevation/ossimElevManager.h"
-#include "base/ossimFilename.h"
+#include "ossim/elevation/ossimElevManager.h"
+#include "ossim/base/ossimFilename.h"
 
 int otbOssimElevManagerTest4(int argc, char* argv[])
 {
-- 
GitLab