Commit 7d456e53 authored by Emmanuel Christophe's avatar Emmanuel Christophe

COMP: cleaning compilation process

parent 01af611d
......@@ -957,14 +957,18 @@ OPTION(BUILD_EXAMPLES "Build the Examples directory." OFF)
#-----------------------------------------------------------------------------
# Dispatch the build into the proper subdirectories.
#Note: SUBDIRS is deprecated and should be replaced by ADD_SUBDIRECTORY
SUBDIRS(Utilities Code)
#ADD_SUBDIRECTORY(Utilities)
#ADD_SUBDIRECTORY(Code)
#ADD_SUBDIRECTORY(Utilities/otbsvm)
IF (BUILD_EXAMPLES)
SUBDIRS(Examples)
ADD_SUBDIRECTORY(Examples)
ENDIF (BUILD_EXAMPLES)
IF (BUILD_TESTING)
SUBDIRS(Testing)
ADD_SUBDIRECTORY(Testing)
ENDIF (BUILD_TESTING)
#-----------------------------------------------------------------------------
......@@ -1108,50 +1112,50 @@ MARK_AS_ADVANCED(OTB_USE_CPACK)
IF(OTB_USE_CPACK)
INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_PACKAGE_NAME "OTB" CACHE STRING "Package name")
MARK_AS_ADVANCED(CPACK_PACKAGE_NAME)
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Orfeo Toolbox")
MARK_AS_ADVANCED(CPACK_PACKAGE_DESCRIPTION_SUMMARY)
SET(CPACK_PACKAGE_VERSION "${OTB_VERSION_STRING}")
SET(CPACK_PACKAGE_VERSION_MAJOR "${OTB_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${OTB_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${OTB_VERSION_PATCH}")
SET(CPACK_PACKAGE_CONTACT "contact@orfeo-toolbox.org" CACHE STRING "Orfeo toolbox contact email")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Description.txt")
#Debian specific
SET(DEBIAN_PACKAGE_MAINTAINER "debian@orfeo-toolbox.org" CACHE STRING "Debian package maintainer email")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libgdal1-1.5.0 (>= 1.5.1-0), libfltk1.1 (>= 1.1.7-3), libcurl3 (>=7.15.5-1etch1), libfftw3-3 (>=3.1.2-3.1)" CACHE STRING "Debian package dependance" )
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64" CACHE STRING "arch")
MARK_AS_ADVANCED(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
SET(CPACK_DEBIAN_PACKAGE_NAME "libotb" CACHE STRING "Debian package name")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "OrfeoToolbox-${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright/OTBCopyright.txt")
FILE(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_RPM_PACKAGE_DESCRIPTION)
FILE(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_DEBIAN_PACKAGE_DESCRIPTION)
IF(WIN32 AND NOT UNIX AND NOT CYGWIN)
#Find gdal dll files, localized in the GDAL_LIBRARY directory
GET_FILENAME_COMPONENT(GDAL_LIB_DIR "${GDAL_LIBRARY}" PATH )
SET(GDAL_LIB_DIR "${GDAL_LIB_DIR}/" )
INSTALL(DIRECTORY ${GDAL_LIB_DIR}
DESTINATION bin
FILES_MATCHING PATTERN "*.dll" )
INSTALL(DIRECTORY ${GDAL_LIB_DIR}
DESTINATION lib
FILES_MATCHING PATTERN "*.lib" )
ENDIF(WIN32 AND NOT UNIX AND NOT CYGWIN)
INCLUDE(CPack)
INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_PACKAGE_NAME "OTB" CACHE STRING "Package name")
MARK_AS_ADVANCED(CPACK_PACKAGE_NAME)
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Orfeo Toolbox")
MARK_AS_ADVANCED(CPACK_PACKAGE_DESCRIPTION_SUMMARY)
SET(CPACK_PACKAGE_VERSION "${OTB_VERSION_STRING}")
SET(CPACK_PACKAGE_VERSION_MAJOR "${OTB_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${OTB_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${OTB_VERSION_PATCH}")
SET(CPACK_PACKAGE_CONTACT "contact@orfeo-toolbox.org" CACHE STRING "Orfeo toolbox contact email")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Description.txt")
#Debian specific
SET(DEBIAN_PACKAGE_MAINTAINER "debian@orfeo-toolbox.org" CACHE STRING "Debian package maintainer email")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libgdal1-1.5.0 (>= 1.5.1-0), libfltk1.1 (>= 1.1.7-3), libcurl3 (>=7.15.5-1etch1), libfftw3-3 (>=3.1.2-3.1)" CACHE STRING "Debian package dependance" )
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64" CACHE STRING "arch")
MARK_AS_ADVANCED(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
SET(CPACK_DEBIAN_PACKAGE_NAME "libotb" CACHE STRING "Debian package name")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "OrfeoToolbox-${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright/OTBCopyright.txt")
FILE(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_RPM_PACKAGE_DESCRIPTION)
FILE(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_DEBIAN_PACKAGE_DESCRIPTION)
IF(WIN32 AND NOT UNIX AND NOT CYGWIN)
#Find gdal dll files, localized in the GDAL_LIBRARY directory
GET_FILENAME_COMPONENT(GDAL_LIB_DIR "${GDAL_LIBRARY}" PATH )
SET(GDAL_LIB_DIR "${GDAL_LIB_DIR}/" )
INSTALL(DIRECTORY ${GDAL_LIB_DIR}
DESTINATION bin
FILES_MATCHING PATTERN "*.dll" )
INSTALL(DIRECTORY ${GDAL_LIB_DIR}
DESTINATION lib
FILES_MATCHING PATTERN "*.lib" )
ENDIF(WIN32 AND NOT UNIX AND NOT CYGWIN)
INCLUDE(CPack)
ENDIF(OTB_USE_CPACK)
......@@ -1165,4 +1169,4 @@ ADD_CUSTOM_COMMAND(
POST_BUILD
COMMAND GenerateConfigProperties
ARGS "${otbconfigfile_DEFAULT}" "${OTB_STREAM_IMAGE_SIZE_TO_ACTIVATE_STREAMING}" "${OTB_STREAM_MAX_SIZE_BUFFER_FOR_STREAMING}"
COMMENT "Generating ${otbconfigfile_DEFAULT}" )
\ No newline at end of file
COMMENT "Generating ${otbconfigfile_DEFAULT}" )
SUBDIRS(
Common
BasicFilters
IO
ChangeDetection
FeatureExtraction
Learning
MultiScale
DisparityMap
SpatialReasoning
Projections
Radiometry
Fusion
Markov
SARPolarimetry
Testing
)
ADD_SUBDIRECTORY(Common)
ADD_SUBDIRECTORY(BasicFilters)
ADD_SUBDIRECTORY(IO)
ADD_SUBDIRECTORY(ChangeDetection)
ADD_SUBDIRECTORY(FeatureExtraction)
ADD_SUBDIRECTORY(Learning)
ADD_SUBDIRECTORY(MultiScale)
ADD_SUBDIRECTORY(DisparityMap)
ADD_SUBDIRECTORY(SpatialReasoning)
ADD_SUBDIRECTORY(Projections)
ADD_SUBDIRECTORY(Radiometry)
ADD_SUBDIRECTORY(Fusion)
ADD_SUBDIRECTORY(Markov)
ADD_SUBDIRECTORY(SARPolarimetry)
ADD_SUBDIRECTORY(Testing)
IF(OTB_USE_VISU_GUI)
SUBDIRS(Visu Gui Visualization)
ADD_SUBDIRECTORY(Visu)
ADD_SUBDIRECTORY(Gui)
ADD_SUBDIRECTORY(Visualization)
ENDIF(OTB_USE_VISU_GUI)
IF(OTB_USE_PQXX)
SUBDIRS(GeospatialAnalysis)
ADD_SUBDIRECTORY(GeospatialAnalysis)
ENDIF(OTB_USE_PQXX)
IF(OTB_COMPILE_WITH_FULL_WARNING)
......
......@@ -5,35 +5,34 @@ PROJECT(OTBExamples)
IF(OTB_BINARY_DIR)
# We are building inside the tree.
SUBDIRS(
BasicFilters
FeatureExtraction
DataRepresentation
IO
Filtering
ChangeDetection
Learning
Classification
Segmentation
Iterators
MultiScale
DisparityMap
Projections
Registration
Radiometry
SARPolarimetry
Fusion
Tutorials
Markov
OBIA
)
ADD_SUBDIRECTORY(BasicFilters)
ADD_SUBDIRECTORY(FeatureExtraction)
ADD_SUBDIRECTORY(DataRepresentation)
ADD_SUBDIRECTORY(IO)
ADD_SUBDIRECTORY(Filtering)
ADD_SUBDIRECTORY(ChangeDetection)
ADD_SUBDIRECTORY(Learning)
ADD_SUBDIRECTORY(Classification)
ADD_SUBDIRECTORY(Segmentation)
ADD_SUBDIRECTORY(Iterators)
ADD_SUBDIRECTORY(MultiScale)
ADD_SUBDIRECTORY(DisparityMap)
ADD_SUBDIRECTORY(Projections)
ADD_SUBDIRECTORY(Registration)
ADD_SUBDIRECTORY(Radiometry)
ADD_SUBDIRECTORY(SARPolarimetry)
ADD_SUBDIRECTORY(Fusion)
ADD_SUBDIRECTORY(Tutorials)
ADD_SUBDIRECTORY(Markov)
ADD_SUBDIRECTORY(OBIA)
IF(OTB_USE_VISU_GUI)
SUBDIRS(Visu)
ADD_SUBDIRECTORY(Visu)
ENDIF(OTB_USE_VISU_GUI)
IF(OTB_USE_PATENTED)
SUBDIRS( Patented )
ADD_SUBDIRECTORY( Patented )
ENDIF(OTB_USE_PATENTED)
#Recopie du fichier README.txt dans l'arborescence BINARY
......@@ -64,34 +63,32 @@ ELSE(OTB_BINARY_DIR)
FIND_PACKAGE(OTB)
IF(OTB_FOUND)
INCLUDE(${OTB_USE_FILE})
SUBDIRS(
BasicFilters
FeatureExtraction
DataRepresentation
IO
Filtering
ChangeDetection
Learning
Classification
Segmentation
Iterators
MultiScale
DisparityMap
Registration
Radiometry
SARPolarimetry
Fusion
Tutorials
Markov
OBIA
)
ADD_SUBDIRECTORY(BasicFilters)
ADD_SUBDIRECTORY(FeatureExtraction)
ADD_SUBDIRECTORY(DataRepresentation)
ADD_SUBDIRECTORY(IO)
ADD_SUBDIRECTORY(Filtering)
ADD_SUBDIRECTORY(ChangeDetection)
ADD_SUBDIRECTORY(Learning)
ADD_SUBDIRECTORY(Classification)
ADD_SUBDIRECTORY(Segmentation)
ADD_SUBDIRECTORY(Iterators)
ADD_SUBDIRECTORY(MultiScale)
ADD_SUBDIRECTORY(DisparityMap)
ADD_SUBDIRECTORY(Registration)
ADD_SUBDIRECTORY(Radiometry)
ADD_SUBDIRECTORY(SARPolarimetry)
ADD_SUBDIRECTORY(Fusion)
ADD_SUBDIRECTORY(Tutorials)
ADD_SUBDIRECTORY(Markov)
ADD_SUBDIRECTORY(OBIA)
IF(OTB_USE_VISU_GUI)
SUBDIRS(Visu)
ADD_SUBDIRECTORY(Visu)
ENDIF(OTB_USE_VISU_GUI)
IF(OTB_USE_PATENTED)
SUBDIRS( Patented )
ADD_SUBDIRECTORY( Patented )
ENDIF(OTB_USE_PATENTED)
ELSE(OTB_FOUND)
MESSAGE("OTB not found. Please set OTB_DIR")
......
......@@ -6,11 +6,13 @@ PROJECT(OTBTesting)
# normal OTB build or as a stand-alone project. This design is useful
# for testing the installation tree of OTB.
MAKE_DIRECTORY(${OTBTesting_BINARY_DIR}/Temporary)
FILE(MAKE_DIRECTORY ${OTBTesting_BINARY_DIR}/Temporary)
IF(OTB_BINARY_DIR)
# We are building inside the tree.
SUBDIRS(Code Fa Utilities)
ADD_SUBDIRECTORY(Code)
ADD_SUBDIRECTORY(Fa)
ADD_SUBDIRECTORY(Utilities)
ELSE(OTB_BINARY_DIR)
# We are building as a stand-alone project.
SET(LIBRARY_OUTPUT_PATH ${OTBTesting_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.")
......@@ -41,8 +43,7 @@ ELSE(OTB_BINARY_DIR)
FIND_PACKAGE(OTB)
IF(OTB_FOUND)
INCLUDE(${OTB_USE_FILE})
# SUBDIRS(Code Fa Utilities)
SUBDIRS(Code)
ADD_SUBDIRECTORY(Code)
ELSE(OTB_FOUND)
MESSAGE("OTB not found. Please set OTB_DIR")
ENDIF(OTB_FOUND)
......
# $Id$
SUBDIRS(
Common
IO
BasicFilters
FeatureExtraction
ChangeDetection
Learning
MultiScale
DisparityMap
SpatialReasoning
Projections
Radiometry
Fusion
Markov
SARPolarimetry
TestSystem
)
ADD_SUBDIRECTORY(Common)
ADD_SUBDIRECTORY(IO)
ADD_SUBDIRECTORY(BasicFilters)
ADD_SUBDIRECTORY(FeatureExtraction)
ADD_SUBDIRECTORY(ChangeDetection)
ADD_SUBDIRECTORY(Learning)
ADD_SUBDIRECTORY(MultiScale)
ADD_SUBDIRECTORY(DisparityMap)
ADD_SUBDIRECTORY(SpatialReasoning)
ADD_SUBDIRECTORY(Projections)
ADD_SUBDIRECTORY(Radiometry)
ADD_SUBDIRECTORY(Fusion)
ADD_SUBDIRECTORY(Markov)
ADD_SUBDIRECTORY(SARPolarimetry)
ADD_SUBDIRECTORY(TestSystem)
IF(OTB_USE_VISU_GUI)
SUBDIRS(Visu Gui Visualization)
ADD_SUBDIRECTORY(Visu)
ADD_SUBDIRECTORY(Gui)
ADD_SUBDIRECTORY(Visualization)
ENDIF(OTB_USE_VISU_GUI)
IF(OTB_USE_PQXX)
SUBDIRS(GeospatialAnalysis)
ADD_SUBDIRECTORY(GeospatialAnalysis)
ENDIF(OTB_USE_PQXX)
......@@ -8,35 +8,45 @@ IF(OTB_USE_VISU_GUI)
ENDIF(OTB_USE_VISU_GUI)
IF(NOT OTB_USE_EXTERNAL_ITK)
SUBDIRS(ITK)
ADD_SUBDIRECTORY(ITK)
ENDIF(NOT OTB_USE_EXTERNAL_ITK)
IF(NOT OTB_USE_EXTERNAL_OPENTHREADS)
SUBDIRS( otbopenthreads )
ADD_SUBDIRECTORY( otbopenthreads )
ENDIF(NOT OTB_USE_EXTERNAL_OPENTHREADS)
IF(OTB_USE_LIBLAS)
SUBDIRS( otbliblas )
ADD_SUBDIRECTORY( otbliblas )
ENDIF(OTB_USE_LIBLAS)
IF(OTB_COMPILE_JPEG2000)
SUBDIRS( otbopenjpeg )
ADD_SUBDIRECTORY( otbopenjpeg )
ENDIF(OTB_COMPILE_JPEG2000)
IF(NOT OTB_USE_EXTERNAL_EXPAT)
SUBDIRS( otbexpat )
ADD_SUBDIRECTORY( otbexpat )
ENDIF(NOT OTB_USE_EXTERNAL_EXPAT)
IF(NOT OTB_USE_EXTERNAL_BOOST)
SUBDIRS(BGL)
ADD_SUBDIRECTORY(BGL)
ENDIF(NOT OTB_USE_EXTERNAL_BOOST)
SUBDIRS(otbsvm dxflib InsightJournal otbossim otbossimplugins otb6S tinyXMLlib otbkml otbedison otbsiftfast otbconfigfile)
ADD_SUBDIRECTORY(otbsvm )
ADD_SUBDIRECTORY(dxflib)
ADD_SUBDIRECTORY(InsightJournal)
ADD_SUBDIRECTORY(otbossim)
ADD_SUBDIRECTORY(otbossimplugins)
ADD_SUBDIRECTORY(otb6S)
ADD_SUBDIRECTORY(tinyXMLlib)
ADD_SUBDIRECTORY(otbkml)
ADD_SUBDIRECTORY(otbedison)
ADD_SUBDIRECTORY(otbsiftfast)
ADD_SUBDIRECTORY(otbconfigfile)
IF(BUILD_TESTING)
SUBDIRS( Dart )
ADD_SUBDIRECTORY( Dart )
ENDIF(BUILD_TESTING)
......
......@@ -84,7 +84,8 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/opj_configure.h.in
#-----------------------------------------------------------------------------
# Always build the library
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
SUBDIRS(libopenjpeg)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
ADD_SUBDIRECTORY(libopenjpeg)
#-----------------------------------------------------------------------------
# For the documentation
......
......@@ -72,7 +72,7 @@ typedef struct v4dwt_local {
static const OPJ_FLOAT32 alpha = 1.586134342f; // 12994
static const OPJ_FLOAT32 beta = 0.052980118f; // 434
static const OPJ_FLOAT32 gamma = -0.882911075f; // -7233
static const OPJ_FLOAT32 opj_gamma_const = -0.882911075f; // -7233
static const OPJ_FLOAT32 delta = -0.443506852f; // -3633
static const OPJ_FLOAT32 K = 1.230174105f; // 10078
......@@ -772,14 +772,14 @@ static void v4dwt_decode(v4dwt_t* restrict dwt){
v4dwt_decode_step1_sse(dwt->wavelet+a, dwt->sn, _mm_set1_ps(K));
v4dwt_decode_step1_sse(dwt->wavelet+b, dwt->dn, _mm_set1_ps(c13318));
v4dwt_decode_step2_sse(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, int_min(dwt->sn, dwt->dn-a), _mm_set1_ps(delta));
v4dwt_decode_step2_sse(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), _mm_set1_ps(gamma));
v4dwt_decode_step2_sse(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), _mm_set1_ps(opj_gamma_const));
v4dwt_decode_step2_sse(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, int_min(dwt->sn, dwt->dn-a), _mm_set1_ps(beta));
v4dwt_decode_step2_sse(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), _mm_set1_ps(alpha));
#else
v4dwt_decode_step1(dwt->wavelet+a, dwt->sn, K);
v4dwt_decode_step1(dwt->wavelet+b, dwt->dn, c13318);
v4dwt_decode_step2(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, int_min(dwt->sn, dwt->dn-a), delta);
v4dwt_decode_step2(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), gamma);
v4dwt_decode_step2(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), opj_gamma_const);
v4dwt_decode_step2(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, int_min(dwt->sn, dwt->dn-a), beta);
v4dwt_decode_step2(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), alpha);
#endif
......
......@@ -5,6 +5,8 @@ SET(ossimplugins_VERSION_MINOR "7")
SET(ossimplugins_VERSION_PATCH "15")
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/ossim ${CMAKE_CURRENT_SOURCE_DIR}/ossim/otb
${OTB_SOURCE_DIR}/Utilities/otbossim/include
${OTB_BINARY_DIR}/Utilities/otbossim/include
# ${CMAKE_CURRENT_SOURCE_DIR}/../otbossim/include/ossim/projection
# ${CMAKE_CURRENT_SOURCE_DIR}/../otbossim/include/ossim/projection/otb
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment