diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c81f786b4d9fbf220f7cc20795f97795da55a5f..b7e104168bcc9264bc6a9639dbe1e812d519b3eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,10 +71,12 @@ OPTION(BUILD_TESTING "Build testing." OFF) # Case for release 2.2.1 # Use the openjpeg library. -OPTION(OTB_USE_OPENJPEG "Use the openjpeg library." OFF) -MARK_AS_ADVANCED(OTB_USE_OPENJPEG) -# Add compiler option -ADD_DEFINITIONS(-DOTB_USE_OPENJPEG) +OPTION(OTB_USE_JPEG2000 "Use to support jpeg2000 image file format." OFF) +MARK_AS_ADVANCED(OTB_USE_JPEG2000) +# Add compiler option +IF(OTB_USE_JPEG2000) +ADD_DEFINITIONS(-DOTB_USE_JPEG2000) +ENDIF(OTB_USE_JPEG2000) #----------------------------------------------------------------------------- @@ -476,11 +478,11 @@ SET(OTB_ALGO_UTILITIES_DEPENDENT_LIBRARIES "otb6S otbgalib InsightJournal otbsvm IF(NOT OTB_USE_EXTERNAL_ITK) # Case for release 2.2.1 # SET(OTB_UTILITIES_DEPENDENT_LIBRARIES "${OTB_UTILITIES_DEPENDENT_LIBRARIES}") - IF(OTB_USE_OPENJPEG) + IF(OTB_USE_JPEG2000) SET(OTB_UTILITIES_DEPENDENT_LIBRARIES "${OTB_UTILITIES_DEPENDENT_LIBRARIES} otbopenjpeg") - ELSE(OTB_USE_OPENJPEG) + ELSE(OTB_USE_JPEG2000) SET(OTB_UTILITIES_DEPENDENT_LIBRARIES "${OTB_UTILITIES_DEPENDENT_LIBRARIES} ") - ENDIF(OTB_USE_OPENJPEG) + ENDIF(OTB_USE_JPEG2000) ENDIF(NOT OTB_USE_EXTERNAL_ITK) # => Create OTB_ALLS_UTILITIES_DEPENDENT_LIBRARIES diff --git a/Code/IO/CMakeLists.txt b/Code/IO/CMakeLists.txt index 0cbcad9c8ef1c69efbddec9f9126253b1ba85861..0b16454e721e028788abf5d3a306c4bcffd4e290 100755 --- a/Code/IO/CMakeLists.txt +++ b/Code/IO/CMakeLists.txt @@ -4,11 +4,11 @@ FILE(GLOB OTBIO_SRCS "*.cxx" ) # Case for release 2.2.1 IF(OTB_USE_EXTERNAL_ITK) - IF(NOT OTB_USE_OPENJPEG) + IF(NOT OTB_USE_JPEG2000) LIST(REMOVE_ITEM OTBIO_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/otbJPEG2000ImageIO.cxx" ) LIST(REMOVE_ITEM OTBIO_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/otbJPEG2000ImageIOFactory.cxx" ) ADD_DEFINITIONS(-DOTB_JPEG2000_DISABLED) - ENDIF(NOT OTB_USE_OPENJPEG) + ENDIF(NOT OTB_USE_JPEG2000) ENDIF(OTB_USE_EXTERNAL_ITK) IF( NOT OTB_USE_CURL ) @@ -19,13 +19,13 @@ ENDIF( NOT OTB_USE_CURL ) # Case for release 2.2.1 # otbopenjpeg -IF(OTB_USE_OPENJPEG) +IF(OTB_USE_JPEG2000) IF(OTB_BUILD_SHARED_LIBS) ADD_DEFINITIONS(-DOPJ_EXPORTS) ELSE(OTB_BUILD_SHARED_LIBS) ADD_DEFINITIONS(-DOPJ_STATIC) ENDIF(OTB_BUILD_SHARED_LIBS) -ENDIF(OTB_USE_OPENJPEG) +ENDIF(OTB_USE_JPEG2000) ADD_LIBRARY(OTBIO ${OTBIO_SRCS}) @@ -36,11 +36,11 @@ ELSE(OTB_USE_EXTERNAL_ITK) # Case for release 2.2.1 ## TARGET_LINK_LIBRARIES (OTBIO gdal OTBCommon ITKIO ITKCommon otbossim dxf otbopenjpeg) #TARGET_LINK_LIBRARIES (OTBIO gdal OTBCommon ITKIO ITKCommon otbossim dxf) - IF(OTB_USE_OPENJPEG) + IF(OTB_USE_JPEG2000) TARGET_LINK_LIBRARIES (OTBIO gdal OTBCommon ITKIO ITKCommon otbossim dxf otbopenjpeg) - ELSE(OTB_USE_OPENJPEG) + ELSE(OTB_USE_JPEG2000) TARGET_LINK_LIBRARIES (OTBIO gdal OTBCommon ITKIO ITKCommon otbossim dxf) - ENDIF(OTB_USE_OPENJPEG) + ENDIF(OTB_USE_JPEG2000) ENDIF(OTB_USE_EXTERNAL_ITK) IF( OTB_USE_CURL ) @@ -63,10 +63,10 @@ ENDIF( NOT OTB_USE_CURL ) # Case for release 2.2.1 IF(OTB_USE_EXTERNAL_ITK) - IF(OTB_USE_OPENJPEG) + IF(OTB_USE_JPEG2000) LIST(REMOVE_ITEM __files1 "${CMAKE_CURRENT_SOURCE_DIR}/otbJpeg2000ImageIOFactory.h" ) LIST(REMOVE_ITEM __files1 "${CMAKE_CURRENT_SOURCE_DIR}/otbJpeg2000ImageIO.h" ) - ENDIF(OTB_USE_OPENJPEG) + ENDIF(OTB_USE_JPEG2000) ENDIF(OTB_USE_EXTERNAL_ITK) diff --git a/Testing/Code/IO/CMakeLists.txt b/Testing/Code/IO/CMakeLists.txt index 2ed2d3340eddb6c8ebd744e98ae96c010b8afd84..6b269ce8279c30b8c077c6263ed0b98908b7af92 100755 --- a/Testing/Code/IO/CMakeLists.txt +++ b/Testing/Code/IO/CMakeLists.txt @@ -1271,7 +1271,7 @@ ADD_TEST(ioTvossimElevManagerTest ${IO_TESTS12} # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Case for release 2.2.1 -IF(OTB_USE_OPENJPEG) +IF(OTB_USE_JPEG2000) IF(NOT OTB_USE_EXTERNAL_ITK) # --- JPEG2000 can read --- @@ -1327,7 +1327,7 @@ ADD_TEST(ioTuJPEG2000ImageIOCanWrite ${IO_TESTS13} ${INPUTDATA}/toto.j2k ) ENDIF(NOT OTB_USE_EXTERNAL_ITK) -ENDIF(OTB_USE_OPENJPEG) +ENDIF(OTB_USE_JPEG2000) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbIOTESTS14 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1495,20 +1495,20 @@ otbOssimElevManagerTest.cxx ) -IF(OTB_USE_OPENJPEG) +IF(OTB_USE_JPEG2000) SET(BasicIO_SRCS13 otbJPEG2000ImageIOTestCanRead.cxx otbJPEG2000ImageIOTestCanWrite.cxx ) -ENDIF(OTB_USE_OPENJPEG) +ENDIF(OTB_USE_JPEG2000) # Case for release 2.2.1 -IF(OTB_USE_OPENJPEG) +IF(OTB_USE_JPEG2000) IF(OTB_USE_EXTERNAL_ITK) LIST(REMOVE_ITEM BasicIO_SRCS13 "${CMAKE_CURRENT_SOURCE_DIR}/otbJPEG2000ImageIOTestCanRead.cxx" ) LIST(REMOVE_ITEM BasicIO_SRCS13 "${CMAKE_CURRENT_SOURCE_DIR}/otbJPEG2000ImageIOTestCanWrite.cxx" ) ENDIF(OTB_USE_EXTERNAL_ITK) -ENDIF(OTB_USE_OPENJPEG) +ENDIF(OTB_USE_JPEG2000) SET(BasicIO_SRCS14 otbOGRDriverTest.cxx diff --git a/Testing/Code/IO/otbIOTests13.cxx b/Testing/Code/IO/otbIOTests13.cxx index 8a73506c217e4ab4e613cb80a9d58d87b2775905..4bcba2ea4cf4cfbf6c051c0e46d9201c6d2ba6c6 100644 --- a/Testing/Code/IO/otbIOTests13.cxx +++ b/Testing/Code/IO/otbIOTests13.cxx @@ -28,8 +28,8 @@ void RegisterTests() { - //# Case for release 2.2.0 - if(OTB_USE_OPENJPEG) + //# Case for release 2.2.1 + if(OTB_USE_JPEG2000) { REGISTER_TEST(otbJPEG2000ImageIOTestCanRead); REGISTER_TEST(otbJPEG2000ImageIOTestCanWrite); diff --git a/Testing/Utilities/CMakeLists.txt b/Testing/Utilities/CMakeLists.txt index 3fd96a0a06e934579b383d563f5ed8205da13a27..e9f717c4799d0fd8f7b708047b4b3d381093988a 100644 --- a/Testing/Utilities/CMakeLists.txt +++ b/Testing/Utilities/CMakeLists.txt @@ -1,4 +1,4 @@ - +$ IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING ) SET(BASELINE ${OTB_DATA_ROOT}/Baseline/OTB/Images) @@ -416,20 +416,20 @@ itkScaleInvariantFeatureImageFilterTest.cxx ) # Case for release 2.2.1 -IF(OTB_USE_OPENJPEG) +IF(OTB_USE_JPEG2000) SET(UtilitiesTests_SRCS ${UtilitiesTests_SRCS} openJpegEncoder.cxx openJpegDecoder.cxx) -ENDIF(OTB_USE_OPENJPEG) +ENDIF(OTB_USE_JPEG2000) INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}") INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}") ADD_EXECUTABLE(otbUtilitiesTests otbUtilitiesTests.cxx ${UtilitiesTests_SRCS}) -IF(OTB_USE_OPENJPEG) +IF(OTB_USE_JPEG2000) TARGET_LINK_LIBRARIES(otbUtilitiesTests OTBIO OTBCommon gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon otbossim otbsvm otb6S tinyXML openjpeg) -ELSE(OTB_USE_OPENJPEG) +ELSE(OTB_USE_JPEG2000) TARGET_LINK_LIBRARIES(otbUtilitiesTests OTBIO OTBCommon gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon otbossim otbsvm otb6S tinyXML ) -ENDIF(OTB_USE_OPENJPEG) +ENDIF(OTB_USE_JPEG2000) IF(UNIX) TARGET_LINK_LIBRARIES (otbUtilitiesTests m) ENDIF(UNIX) diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt index 75dacddc1396dbebe19291314fc401eeddb5f69f..c4270a4ee4a7dcdbf5879bbecb0621bd9bfaa50e 100755 --- a/Utilities/CMakeLists.txt +++ b/Utilities/CMakeLists.txt @@ -4,9 +4,9 @@ IF(NOT OTB_USE_EXTERNAL_ITK) SUBDIRS(ITK) # Case for release 2.2.1 - IF(NOT OTB_USE_OPENJPEG) + IF(NOT OTB_USE_JPEG2000) SUBDIRS( ITK otbopenjpeg) - ENDIF(NOT OTB_USE_OPENJPEG) + ENDIF(NOT OTB_USE_JPEG2000) ENDIF(NOT OTB_USE_EXTERNAL_ITK) IF(OTB_USE_VISU_GUI) diff --git a/Utilities/ITK/Utilities/CMakeLists.txt b/Utilities/ITK/Utilities/CMakeLists.txt index df16bee1e5315220453a333b2def425af121f665..d80e4575676a528a1b9b54acb0fbc454eb924e73 100644 --- a/Utilities/ITK/Utilities/CMakeLists.txt +++ b/Utilities/ITK/Utilities/CMakeLists.txt @@ -25,10 +25,10 @@ SET(OPJ_PREFIX "itk") # In static, pb of linking between itkopenjpeg and otbopenjeg (method definided twice) # Case for release 2.2.1 #----------------------------- -IF(NOT OTB_USE_OPENJPEG) +IF(NOT OTB_USE_JPEG2000) ITK_THIRD_PARTY_SUBDIR(OpenJPEG openjpeg) ITK_THIRD_PARTY_SUBDIR(GDCM gdcm) -ENDIF(NOT OTB_USE_OPENJPEG) +ENDIF(NOT OTB_USE_JPEG2000) #------------------------------------------------------------------------------ diff --git a/otbIncludeDirectories.cmake b/otbIncludeDirectories.cmake index 2456b1aee1e7346c008a55c93adb85c5c4beae20..63bb362c635fd68e388f592915b1f19c8154c7f5 100644 --- a/otbIncludeDirectories.cmake +++ b/otbIncludeDirectories.cmake @@ -43,9 +43,9 @@ SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE} # ${OTB_SOURCE_DIR}/Utilities/otbkml/third_party/zlib-1.2.3/contrib ) # Case for release 2.2.1 -IF(OTB_USE_OPENJPEG) +IF(OTB_USE_JPEG2000) SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE} ${OTB_SOURCE_DIR}/Utilities/otbopenjpeg/libopenjpeg) -ENDIF(OTB_USE_OPENJPEG) +ENDIF(OTB_USE_JPEG2000) #----------------------------------------------------------------------------- # Include directories from the ossim build tree @@ -195,10 +195,10 @@ SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE} # ${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbkml/third_party/zlib-1.2.3/contrib ) -# Case for release 2.2.0 -IF(OTB_USE_OPENJPEG) +# Case for release 2.2.1 +IF(OTB_USE_JPEG2000) SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE} ${OTB_INSTALL_INCLUDE_DIR}/Utilities/otbopenjpeg/libopenjpeg) -ENDIF(OTB_USE_OPENJPEG) +ENDIF(OTB_USE_JPEG2000) #For GDAL header file SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}