Skip to content
Snippets Groups Projects
Commit fe775e6b authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

RM: remove OpenJPEG third-party

parent 589e55d8
No related branches found
No related tags found
No related merge requests found
project(OTBOpenJPEG)
set(OTBOpenJPEG_SYSTEM_INCLUDE_DIRS ${OPENJPEG_INCLUDE_DIRS})
set(OTBOpenJPEG_LIBRARIES "${OPENJPEG_LIBRARIES}")
set(OTBOpenJPEG_INCLUDE_DIRS ${OTBOpenJPEG_BINARY_DIR}/src)
set(OTBOpenJPEG_EXPORT_CODE_BUILD "
if(NOT OpenJPEG_FOUND)
find_package(OpenJPEG REQUIRED HINTS ${OpenJPEG_DIR})
endif()")
set(OTBOpenJPEG_EXPORT_CODE_INSTALL ${OTBOpenJPEG_EXPORT_CODE_BUILD})
if(OpenJPEG_FOUND)
math(EXPR OTBOpenJPEG_VERSION_NUMBER
"((${OPENJPEG_MAJOR_VERSION})*100+${OPENJPEG_MINOR_VERSION})*100+${OPENJPEG_BUILD_VERSION}")
configure_file( src/otb_openjpeg.h.in src/otb_openjpeg.h )
endif()
message(STATUS "Found OpenJPEG : ${OPENJPEG_LIBRARIES} (version ${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION})")
message(STATUS "Caution : there could be a version conflict if ITK also contains an OpenJPEG version. "
"Depending on ITK version and enabled modules, the OpenJPEG headers can be "
"present in ITK include folder. Since the include order between modules is "
"deterministic, the OpenJPEG header from ITK may be included first. To avoid "
"version conflicts, try to use an ITK installed without GDCM nor ITKReview. "
"An alternative fix is to simply hide the header openjpeg.h in the ITK "
"include directory.")
otb_module_impl()
install(FILES ${OTBOpenJPEG_BINARY_DIR}/src/otb_openjpeg.h
DESTINATION ${OTBOpenJPEG_INSTALL_INCLUDE_DIR}
COMPONENT Development
)
find_package( OpenJPEG REQUIRED )
mark_as_advanced( OpenJPEG_DIR )
set(DOCUMENTATION "This module imports OpenJPEG to the build system")
otb_module(OTBOpenJPEG
DEPENDS
TEST_DEPENDS
DESCRIPTION
"${DOCUMENTATION}"
)
otb_module_activation_option("Enable OpenJpeg dependent modules. Note that this may not be needed if your GDal has a JPEG2000 compatible driver (other than jasper)" OFF)
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef otb_openjpeg_h
#define otb_openjpeg_h
/* different API between 2.0 and 2.1 */
#define OTBOpenJPEG_VERSION_NUMBER @OTBOpenJPEG_VERSION_NUMBER@
extern "C"
{
#include "openjpeg.h"
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment