Commit 63f0d991 authored by Emmanuel Christophe's avatar Emmanuel Christophe

COMP: modify gdal search and gdal linking process

parent f5522e9e
......@@ -315,7 +315,7 @@ ENDIF(OTB_USE_CURL)
# GDAL Library
#-------------------------------
#FIND_LIBRARY(GDAL_LIBRARY_DIRS gdal PATHS $ENV{GDAL_LIBRARY_DIRS} )
FIND_PATH(GDAL_LIBRARY_DIRS gdal PATHS $ENV{GDAL_LIBRARY_DIRS} )
FIND_PATH(GDAL_INCLUDE_DIRS gdal.h $ENV{GDAL_INCLUDE_DIRS} /usr/include/gdal)
......@@ -331,6 +331,9 @@ ENDIF (NOT GDAL_INCLUDE_DIRS)
INCLUDE_DIRECTORIES(${GDAL_INCLUDE_DIRS})
LINK_DIRECTORIES( ${GDAL_LIBRARY_DIRS} )
FIND_LIBRARY(GDAL_LIBRARY NAMES gdal gdal1.5.0 PATHS GDAL_LIBRARY_DIRS)
# Find geotiff headers
FIND_PATH(GEOTIFF_INCLUDE_DIRS geotiff.h $ENV{GDAL_INCLUDE_DIRS} /usr/include/geotiff)
IF (NOT GEOTIFF_INCLUDE_DIRS)
......@@ -347,13 +350,13 @@ MESSAGE(FATAL_ERROR
ENDIF (NOT TIFF_INCLUDE_DIRS)
INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIRS})
# Check if gdal has tiff library
SET(TIFF_LIBRARY gdal)
# Check if ${GDAL_LIBRARY} has tiff library
SET(TIFF_LIBRARY ${GDAL_LIBRARY})
IF(NOT DEFINED GDAL_HAS_TIFF)
TRY_COMPILE(GDAL_HAS_TIFF
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/CMake/TestGDALHasTiff.cxx
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${TIFF_INCLUDE_DIRS};${GDAL_INCLUDE_DIRS}" "-DLINK_DIRECTORIES:PATH=${GDAL_LIBRARY_DIRS}" "-DLINK_LIBRARIES:STRING=gdal"
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${TIFF_INCLUDE_DIRS};${GDAL_INCLUDE_DIRS}" "-DLINK_DIRECTORIES:PATH=${GDAL_LIBRARY_DIRS}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}"
OUTPUT_VARIABLE OUTPUT)
IF(GDAL_HAS_TIFF)
MESSAGE(STATUS "Testing if GDAL has tiff -- yes.")
......@@ -367,13 +370,13 @@ ENDIF (NOT TIFF_LIBRARY)
ENDIF(GDAL_HAS_TIFF)
ENDIF(NOT DEFINED GDAL_HAS_TIFF)
# Check if gdal has geotiff library
SET(GEOTIFF_LIBRARY gdal)
# Check if ${GDAL_LIBRARY} has geotiff library
SET(GEOTIFF_LIBRARY ${GDAL_LIBRARY})
IF(NOT DEFINED GDAL_HAS_GEOTIFF)
TRY_COMPILE(GDAL_HAS_GEOTIFF
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/CMake/TestGDALHasGeoTiff.cxx
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GEOTIFF_INCLUDE_DIRS};${GDAL_INCLUDE_DIRS}" "-DLINK_DIRECTORIES:PATH=${GDAL_LIBRARY_DIRS}" "-DLINK_LIBRARIES:STRING=gdal"
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GEOTIFF_INCLUDE_DIRS};${GDAL_INCLUDE_DIRS}" "-DLINK_DIRECTORIES:PATH=${GDAL_LIBRARY_DIRS}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}"
OUTPUT_VARIABLE OUTPUT)
IF(GDAL_HAS_GEOTIFF)
MESSAGE(STATUS "Testing if GDAL has geotiff -- yes.")
......@@ -557,7 +560,7 @@ ENDIF(OTB_USE_VISU_GUI)
# Use OTB_ALLS_UTILITIES_DEPENDENT_LIBRARIES to LINK Utilities Algo libraries into your executable
# => Create OTB_IO_UTILITIES_DEPENDENT_LIBRARIES
SET(OTB_IO_UTILITIES_DEPENDENT_LIBRARIES "gdal;dxf;tinyXML;otbliblas;otbossim;otbossimplugins" )
SET(OTB_IO_UTILITIES_DEPENDENT_LIBRARIES "${GDAL_LIBRARY};dxf;tinyXML;otbliblas;otbossim;otbossimplugins" )
IF(NOT OTB_USE_EXTERNAL_OPENTHREADS)
SET(OTB_IO_UTILITIES_DEPENDENT_LIBRARIES "${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES};${OPENTHREADS_LIBRARY}")
......@@ -739,7 +742,7 @@ MARK_AS_ADVANCED(CPACK_PACKAGE_CONTACT)
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Description.txt")
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_DEPENDS "lib${GDAL_LIBRARY}1-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" )
MARK_AS_ADVANCED(CPACK_DEBIAN_PACKAGE_DEPENDS)
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "OrfeoToolbox-${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}")
......
......@@ -27,7 +27,7 @@ ENDIF(OTB_COMPILE_JPEG2000)
ADD_LIBRARY(OTBIO ${OTBIO_SRCS})
TARGET_LINK_LIBRARIES (OTBIO OTBCommon otbossim gdal otbossimplugins ITKIO ITKCommon dxf otbkml otbliblas)
TARGET_LINK_LIBRARIES (OTBIO OTBCommon otbossim ${GDAL_LIBRARY} otbossimplugins ITKIO ITKCommon dxf otbkml otbliblas)
IF( OTB_COMPILE_JPEG2000 )
TARGET_LINK_LIBRARIES (OTBIO otbopenjpeg)
ENDIF( OTB_COMPILE_JPEG2000 )
......
......@@ -136,6 +136,6 @@ ADD_TEST(MeanShiftVectorImageFilterExampleTest ${EXE_TESTS}
ADD_EXECUTABLE(otbBasicFiltersExamplesTests otbBasicFiltersExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbBasicFiltersExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
TARGET_LINK_LIBRARIES(otbBasicFiltersExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -12,31 +12,31 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
ADD_EXECUTABLE(ChangeDetectionFrameworkExample ChangeDetectionFrameworkExample.cxx )
TARGET_LINK_LIBRARIES(ChangeDetectionFrameworkExample OTBCommon gdal OTBIO ITKCommon ITKIO)
TARGET_LINK_LIBRARIES(ChangeDetectionFrameworkExample OTBCommon ${GDAL_LIBRARY} OTBIO ITKCommon ITKIO)
ADD_EXECUTABLE(DiffChDet DiffChDet.cxx)
TARGET_LINK_LIBRARIES(DiffChDet OTBIO OTBCommon gdal ITKCommon ITKIO)
TARGET_LINK_LIBRARIES(DiffChDet OTBIO OTBCommon ${GDAL_LIBRARY} ITKCommon ITKIO)
ADD_EXECUTABLE(RatioChDet RatioChDet.cxx)
TARGET_LINK_LIBRARIES(RatioChDet OTBIO OTBCommon gdal ITKCommon ITKIO)
TARGET_LINK_LIBRARIES(RatioChDet OTBIO OTBCommon ${GDAL_LIBRARY} ITKCommon ITKIO)
ADD_EXECUTABLE(CorrelChDet CorrelChDet.cxx)
TARGET_LINK_LIBRARIES(CorrelChDet OTBIO OTBCommon gdal ITKCommon ITKIO)
TARGET_LINK_LIBRARIES(CorrelChDet OTBIO OTBCommon ${GDAL_LIBRARY} ITKCommon ITKIO)
ADD_EXECUTABLE(LHMIChDet LHMIChDet.cxx)
TARGET_LINK_LIBRARIES(LHMIChDet OTBIO OTBCommon gdal ITKCommon ITKIO ITKStatistics)
TARGET_LINK_LIBRARIES(LHMIChDet OTBIO OTBCommon ${GDAL_LIBRARY} ITKCommon ITKIO ITKStatistics)
ADD_EXECUTABLE(JHMIChDet JHMIChDet.cxx)
TARGET_LINK_LIBRARIES(JHMIChDet OTBIO OTBCommon gdal ITKCommon ITKIO ITKStatistics)
TARGET_LINK_LIBRARIES(JHMIChDet OTBIO OTBCommon ${GDAL_LIBRARY} ITKCommon ITKIO ITKStatistics)
ADD_EXECUTABLE(KullbackLeiblerDistanceChDet KullbackLeiblerDistanceChDet.cxx)
TARGET_LINK_LIBRARIES(KullbackLeiblerDistanceChDet OTBIO OTBCommon gdal ITKCommon ITKIO ITKStatistics)
TARGET_LINK_LIBRARIES(KullbackLeiblerDistanceChDet OTBIO OTBCommon ${GDAL_LIBRARY} ITKCommon ITKIO ITKStatistics)
ADD_EXECUTABLE(KullbackLeiblerProfileChDet KullbackLeiblerProfileChDet.cxx)
TARGET_LINK_LIBRARIES(KullbackLeiblerProfileChDet OTBIO OTBCommon gdal ITKCommon ITKIO ITKStatistics)
TARGET_LINK_LIBRARIES(KullbackLeiblerProfileChDet OTBIO OTBCommon ${GDAL_LIBRARY} ITKCommon ITKIO ITKStatistics)
ADD_EXECUTABLE(KullbackLeiblerSupervizedDistanceChDet KullbackLeiblerSupervizedDistanceChDet.cxx)
TARGET_LINK_LIBRARIES(KullbackLeiblerSupervizedDistanceChDet OTBIO OTBCommon gdal ITKCommon ITKIO ITKStatistics)
TARGET_LINK_LIBRARIES(KullbackLeiblerSupervizedDistanceChDet OTBIO OTBCommon ${GDAL_LIBRARY} ITKCommon ITKIO ITKStatistics)
IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -124,7 +124,7 @@ ADD_TEST(KullbackLeiblerProfileChDetTest ${EXE_TESTS}
)
ADD_EXECUTABLE(otbChangeDetectionExamplesTests otbChangeDetectionExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbChangeDetectionExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
TARGET_LINK_LIBRARIES(otbChangeDetectionExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -155,6 +155,6 @@ ADD_TEST(ScalarImageKmeansClassifierTest ${EXE_TESTS}
ADD_EXECUTABLE(otbClassificationExamplesTests otbClassificationExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbClassificationExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
TARGET_LINK_LIBRARIES(otbClassificationExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -99,6 +99,6 @@ ADD_TEST(Image6Test ${EXE_TESTS}
ADD_EXECUTABLE(otbImageExamplesTests otbImageExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbImageExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
TARGET_LINK_LIBRARIES(otbImageExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -44,6 +44,6 @@ ADD_TEST(SimpleDisparityMapEstimationExampleTest ${EXE_TESTS}
ADD_EXECUTABLE(otbDisparityMapExamplesTests otbDisparityMapExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbDisparityMapExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
TARGET_LINK_LIBRARIES(otbDisparityMapExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -34,7 +34,7 @@ AssymmetricFusionOfLineDetectorExample.cxx)
TARGET_LINK_LIBRARIES(AssymmetricFusionOfLineDetectorExample OTBFeatureExtraction OTBCommon OTBIO ITKCommon ITKIO)
ADD_EXECUTABLE(LocalHoughExample LocalHoughExample.cxx )
TARGET_LINK_LIBRARIES(LocalHoughExample ITKIO OTBIO OTBFeatureExtraction OTBCommon ITKCommon gdal)
TARGET_LINK_LIBRARIES(LocalHoughExample ITKIO OTBIO OTBFeatureExtraction OTBCommon ITKCommon ${GDAL_LIBRARY})
ADD_EXECUTABLE(ExtractSegmentsByStepsExample
......@@ -309,10 +309,10 @@ ADD_TEST(CloudDetectionExampleTest ${EXE_TESTS2}
)
ADD_EXECUTABLE(otbFeatureExtractionExamplesTests1 otbFeatureExtractionExamplesTests1.cxx)
TARGET_LINK_LIBRARIES(otbFeatureExtractionExamplesTests1 gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
TARGET_LINK_LIBRARIES(otbFeatureExtractionExamplesTests1 ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ADD_EXECUTABLE(otbFeatureExtractionExamplesTests2 otbFeatureExtractionExamplesTests2.cxx)
TARGET_LINK_LIBRARIES(otbFeatureExtractionExamplesTests2 gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
TARGET_LINK_LIBRARIES(otbFeatureExtractionExamplesTests2 ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -518,6 +518,6 @@ ADD_TEST(RationalQuotientResampleImageFilterTest ${EXE_TESTS}
ADD_EXECUTABLE(otbFilteringExamplesTests otbFilteringExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbFilteringExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
TARGET_LINK_LIBRARIES(otbFilteringExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -53,6 +53,6 @@ ADD_TEST(PanSharpeningExampleTest ${EXE_TESTS}
ADD_EXECUTABLE(otbFusionExamplesTests otbFusionExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbFusionExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKNumerics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBFusion)
TARGET_LINK_LIBRARIES(otbFusionExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKNumerics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBFusion)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -194,6 +194,6 @@ ADD_TEST(ShapedNeighborhoodIterators2Test ${EXE_TESTS}
ADD_EXECUTABLE(otbIteratorsExamplesTests otbIteratorsExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbIteratorsExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
TARGET_LINK_LIBRARIES(otbIteratorsExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -6,37 +6,37 @@ TARGET_LINK_LIBRARIES(GenerateTrainingImageExample OTBCommon OTBIO OTBLearning I
ADD_EXECUTABLE(SVMPointSetExample SVMPointSetExample.cxx )
TARGET_LINK_LIBRARIES(SVMPointSetExample ITKIO OTBIO OTBCommon
ITKCommon OTBLearning gdal)
ITKCommon OTBLearning ${GDAL_LIBRARY})
ADD_EXECUTABLE(SVMPointSetModelEstimatorExample SVMPointSetModelEstimatorExample.cxx )
TARGET_LINK_LIBRARIES(SVMPointSetModelEstimatorExample ITKIO OTBIO
OTBCommon ITKCommon OTBLearning gdal)
OTBCommon ITKCommon OTBLearning ${GDAL_LIBRARY})
ADD_EXECUTABLE(SVMImageModelEstimatorExample SVMImageModelEstimatorExample.cxx )
TARGET_LINK_LIBRARIES(SVMImageModelEstimatorExample ITKIO OTBIO
OTBCommon ITKCommon OTBLearning gdal)
OTBCommon ITKCommon OTBLearning ${GDAL_LIBRARY})
ADD_EXECUTABLE(SVMPointSetClassificationExample SVMPointSetClassificationExample.cxx )
TARGET_LINK_LIBRARIES(SVMPointSetClassificationExample ITKIO OTBIO
OTBCommon ITKCommon OTBLearning gdal)
OTBCommon ITKCommon OTBLearning ${GDAL_LIBRARY})
ADD_EXECUTABLE(SVMImageClassificationExample SVMImageClassificationExample.cxx )
TARGET_LINK_LIBRARIES(SVMImageClassificationExample ITKIO OTBIO
OTBCommon ITKCommon OTBLearning gdal)
OTBCommon ITKCommon OTBLearning ${GDAL_LIBRARY})
ADD_EXECUTABLE(SVMImageEstimatorClassificationMultiExample SVMImageEstimatorClassificationMultiExample.cxx )
TARGET_LINK_LIBRARIES(SVMImageEstimatorClassificationMultiExample ITKIO OTBIO
OTBCommon ITKCommon OTBLearning gdal)
OTBCommon ITKCommon OTBLearning ${GDAL_LIBRARY})
ADD_EXECUTABLE(SOMExample SOMExample.cxx )
TARGET_LINK_LIBRARIES(SOMExample ITKIO OTBIO OTBCommon ITKCommon OTBLearning gdal)
TARGET_LINK_LIBRARIES(SOMExample ITKIO OTBIO OTBCommon ITKCommon OTBLearning ${GDAL_LIBRARY})
ADD_EXECUTABLE(SOMClassifierExample SOMClassifierExample.cxx )
TARGET_LINK_LIBRARIES(SOMClassifierExample ITKIO OTBIO OTBCommon ITKCommon OTBLearning gdal)
TARGET_LINK_LIBRARIES(SOMClassifierExample ITKIO OTBIO OTBCommon ITKCommon OTBLearning ${GDAL_LIBRARY})
ADD_EXECUTABLE(SEMModelEstimatorExample SEMModelEstimatorExample.cxx )
TARGET_LINK_LIBRARIES(SEMModelEstimatorExample ITKIO OTBIO OTBCommon ITKCommon OTBLearning gdal)
TARGET_LINK_LIBRARIES(SEMModelEstimatorExample ITKIO OTBIO OTBCommon ITKCommon OTBLearning ${GDAL_LIBRARY})
ADD_EXECUTABLE(SVMGenericKernelImageModelEstimatorExample SVMGenericKernelImageModelEstimatorExample.cxx)
TARGET_LINK_LIBRARIES(SVMGenericKernelImageModelEstimatorExample OTBLearning OTBCommon OTBIO ITKCommon)
......@@ -174,6 +174,6 @@ ADD_TEST(SVMGenericKernelImageClassificationExampleTest ${EXE_TESTS}
ADD_EXECUTABLE(otbLearningExamplesTests otbLearningExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbLearningExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
TARGET_LINK_LIBRARIES(otbLearningExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -83,7 +83,7 @@ ADD_TEST(MarkovRegularizationExampleTest ${EXE_TESTS}
ADD_EXECUTABLE(otbMarkovExamplesTests otbMarkovExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbMarkovExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKNumerics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBMarkov)
TARGET_LINK_LIBRARIES(otbMarkovExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKNumerics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBMarkov)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......
......@@ -94,6 +94,6 @@ ADD_TEST(MorphologicalPyramidSegmenterExampleTest ${EXE_TESTS}
ADD_EXECUTABLE(otbMultiScaleExamplesTests otbMultiScaleExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbMultiScaleExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
TARGET_LINK_LIBRARIES(otbMultiScaleExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -36,6 +36,6 @@ ADD_TEST(HybridSegmentationFuzzyVoronoiTest ${EXE_TESTS}
ADD_EXECUTABLE(otbPatentedExamplesTests otbPatentedExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbPatentedExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
TARGET_LINK_LIBRARIES(otbPatentedExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -115,6 +115,6 @@ ADD_TEST(AtmosphericCorrectionSequencementTest ${EXE_TESTS}
ADD_EXECUTABLE(otbRadiometryExamplesTests otbRadiometryExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbRadiometryExamplesTests OTBBasicFilters OTBCommon OTBDisparityMap OTBRadiometry OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBFusion gdal ITKIO ITKAlgorithms ITKStatistics ITKNumerics ITKCommon )
TARGET_LINK_LIBRARIES(otbRadiometryExamplesTests OTBBasicFilters OTBCommon OTBDisparityMap OTBRadiometry OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBFusion ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKNumerics ITKCommon )
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -557,6 +557,6 @@ ADD_TEST(ImageRegistration5Cas2ExampleTest ${EXE_TESTS}
ADD_EXECUTABLE(otbRegistrationExamplesTests otbRegistrationExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbRegistrationExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKNumerics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
TARGET_LINK_LIBRARIES(otbRegistrationExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKNumerics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -36,7 +36,7 @@ ADD_TEST(rdTvPiOver4ExamplePolarimetricSynthesisFilterTest ${SARPOLARIMETRY_TEST
ADD_EXECUTABLE(otbSARPolarimetryExamplesTests otbSARPolarimetryExamplesTests.cxx )
TARGET_LINK_LIBRARIES(otbSARPolarimetryExamplesTests OTBSARPolarimetry OTBCommon OTBIO gdal ITKIO ITKCommon ITKBasicFilters)
TARGET_LINK_LIBRARIES(otbSARPolarimetryExamplesTests OTBSARPolarimetry OTBCommon OTBIO ${GDAL_LIBRARY} ITKIO ITKCommon ITKBasicFilters)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -372,6 +372,6 @@ ADD_TEST(LabelizeNeighborhoodConnectedImageFilterTest ${EXE_TESTS}
ADD_EXECUTABLE(otbSegmentationExamplesTests otbSegmentationExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbSegmentationExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
TARGET_LINK_LIBRARIES(otbSegmentationExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -111,6 +111,6 @@ ENDIF(OTB_DATA_USE_LARGEINPUT)
ADD_EXECUTABLE(otbTutorialsExamplesTests otbTutorialsExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbTutorialsExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKNumerics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBFusion ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
TARGET_LINK_LIBRARIES(otbTutorialsExamplesTests ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKNumerics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBFusion ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -1136,7 +1136,7 @@ ADD_TEST(ioTvImageMetadataWriterTest_TIF ${IO_TESTS11}
)
# Commented because gdal does not seems to write the metadata the same way in both formats
# Commented because ${GDAL_LIBRARY} does not seems to write the metadata the same way in both formats
#ADD_TEST(ioTvImageMetadataWriterTest_HFA2TIFF ${IO_TESTS11}
# --compare-metadata ${TOL}
# ${INPUTDATA}/HFAGeoreferenced.img
......@@ -1146,7 +1146,7 @@ ADD_TEST(ioTvImageMetadataWriterTest_TIF ${IO_TESTS11}
# ${TEMP}/temp.tif
# )
# Commented because gdal does not seems to write the metadata the same way in both formats
# Commented because ${GDAL_LIBRARY} does not seems to write the metadata the same way in both formats
#ADD_TEST(ioTvImageMetadataWriterTest_TIFF2HFA ${IO_TESTS11}
# --compare-metadata ${TOL}
# ${INPUTDATA}/spot5SubWithGcps.tif
......@@ -1175,7 +1175,7 @@ ADD_TEST(ioTvImageMetadataStreamingWriterTest_TIF ${IO_TESTS11}
${TEMP}/temp.tif
)
# Commented because gdal does not seems to write the metadata the same way in both formats
# Commented because ${GDAL_LIBRARY} does not seems to write the metadata the same way in both formats
#ADD_TEST(ioTvImageMetadataStreamingWriterTest_HFA2TIFF ${IO_TESTS11}
# --compare-metadata ${TOL}
# ${INPUTDATA}/HFAGeoreferenced.img
......@@ -1185,7 +1185,7 @@ ADD_TEST(ioTvImageMetadataStreamingWriterTest_TIF ${IO_TESTS11}
# ${TEMP}/temp.tif
# )
# Commented because gdal does not seems to write the metadata the same way in both formats
# Commented because ${GDAL_LIBRARY} does not seems to write the metadata the same way in both formats
#ADD_TEST(ioTvImageMetadataStreamingWriterTest_TIFF2HFA ${IO_TESTS11}
# --compare-metadata ${TOL}
# ${INPUTDATA}/spot5SubWithGcps.tif
......
......@@ -216,13 +216,13 @@ ADD_TEST(FA-0000041-mean_shift2 ${CXX_TEST_PATH}/0000041-mean_shift
)
ADD_EXECUTABLE(AlignementsQB AlignementsQB.cxx)
TARGET_LINK_LIBRARIES(AlignementsQB OTBFeatureExtraction OTBIO OTBCommon gdal ITKIO ITKCommon)
TARGET_LINK_LIBRARIES(AlignementsQB OTBFeatureExtraction OTBIO OTBCommon ${GDAL_LIBRARY} ITKIO ITKCommon)
ADD_EXECUTABLE(MapActivation MapActivation.cxx)
TARGET_LINK_LIBRARIES(MapActivation OTBFeatureExtraction OTBIO OTBCommon gdal ITKIO ITKCommon)
TARGET_LINK_LIBRARIES(MapActivation OTBFeatureExtraction OTBIO OTBCommon ${GDAL_LIBRARY} ITKIO ITKCommon)
ADD_EXECUTABLE(StreamingStat StreamingStat.cxx)
TARGET_LINK_LIBRARIES(StreamingStat OTBFeatureExtraction OTBIO OTBCommon gdal ITKIO ITKCommon)
TARGET_LINK_LIBRARIES(StreamingStat OTBFeatureExtraction OTBIO OTBCommon ${GDAL_LIBRARY} ITKIO ITKCommon)
ADD_EXECUTABLE(0000041-mean_shift 0000041-mean_shift.cxx)
TARGET_LINK_LIBRARIES(0000041-mean_shift OTBIO OTBCommon OTBBasicFilters)
......
......@@ -515,7 +515,7 @@ IF(NOT BUILD_SHARED_LIBS)
ENDIF(NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE(otbUtilitiesTests otbUtilitiesTests.cxx ${UtilitiesTests_SRCS})
TARGET_LINK_LIBRARIES(otbUtilitiesTests OTBIO OTBCommon gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon otbossim otbsvm otb6S tinyXML otbkml otbsiftfast)
TARGET_LINK_LIBRARIES(otbUtilitiesTests OTBIO OTBCommon ${GDAL_LIBRARY} ITKIO ITKAlgorithms ITKStatistics ITKCommon otbossim otbsvm otb6S tinyXML otbkml otbsiftfast)
IF(OTB_COMPILE_JPEG2000)
TARGET_LINK_LIBRARIES(otbUtilitiesTests otbopenjpeg)
......
......@@ -14,7 +14,7 @@ SET(ossimplugins_SOURCES
ADD_LIBRARY(otbossimplugins ${ossimplugins_SOURCES} )
IF( CYGWIN )
TARGET_LINK_LIBRARIES(otbossimplugins otbossim gdal)
TARGET_LINK_LIBRARIES(otbossimplugins otbossim ${GDAL_LIBRARY})
ENDIF( CYGWIN )
INSTALL(TARGETS otbossimplugins
......
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