From 99177a4cf545b23964c64de3f7adc7e95b66769f Mon Sep 17 00:00:00 2001 From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org> Date: Fri, 18 Dec 2009 15:34:33 +0800 Subject: [PATCH] COMP: fix the issue between gdal and geotiff... now ossim and itk remain --- Code/Common/CMakeLists.txt | 4 ++++ Code/IO/CMakeLists.txt | 6 +++++- Code/Testing/CMakeLists.txt | 4 ++++ Utilities/otbossim/CMakeLists.txt | 9 +++++++-- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Code/Common/CMakeLists.txt b/Code/Common/CMakeLists.txt index c6f7d53028..5196576f01 100644 --- a/Code/Common/CMakeLists.txt +++ b/Code/Common/CMakeLists.txt @@ -12,6 +12,10 @@ ENDIF( NOT OTB_USE_PQXX ) ADD_LIBRARY(OTBCommon ${OTBCommon_SRCS}) +SET_TARGET_PROPERTIES(OTBCommon + PROPERTIES + LINK_INTERFACE_LIBRARIES "" +) TARGET_LINK_LIBRARIES (OTBCommon ITKAlgorithms ITKStatistics ITKCommon otbconfigfile) IF(OTB_USE_MAPNIK) TARGET_LINK_LIBRARIES(OTBCommon ${MAPNIK_LIBRARY}) diff --git a/Code/IO/CMakeLists.txt b/Code/IO/CMakeLists.txt index db0c68c9f8..3d1f1208ee 100644 --- a/Code/IO/CMakeLists.txt +++ b/Code/IO/CMakeLists.txt @@ -30,7 +30,11 @@ ENDIF(OTB_COMPILE_JPEG2000) ADD_LIBRARY(OTBIO ${OTBIO_SRCS}) -TARGET_LINK_LIBRARIES (OTBIO ${GDAL_LIBRARY} ${OGR_LIBRARY} ${TIFF_LIBRARY} ${GEOTIFF_LIBRARY} ${JPEG_LIBRARY} OTBCommon) + SET_TARGET_PROPERTIES(OTBIO + PROPERTIES + LINK_INTERFACE_LIBRARIES "" + ) +TARGET_LINK_LIBRARIES (OTBIO ${GDAL_LIBRARY} ${OGR_LIBRARY} ${JPEG_LIBRARY} ${TIFF_LIBRARY} ${GEOTIFF_LIBRARY} OTBCommon) TARGET_LINK_LIBRARIES (OTBIO otbossim otbossimplugins ITKIO ITKCommon dxf otbkml) IF (OTB_USE_LIBLAS) diff --git a/Code/Testing/CMakeLists.txt b/Code/Testing/CMakeLists.txt index 091ed1945f..29bf017a0a 100644 --- a/Code/Testing/CMakeLists.txt +++ b/Code/Testing/CMakeLists.txt @@ -3,6 +3,10 @@ FILE(GLOB OTBTesting_SRCS "*.cxx" ) ADD_LIBRARY(OTBTesting ${OTBTesting_SRCS}) +SET_TARGET_PROPERTIES(OTBTesting + PROPERTIES + LINK_INTERFACE_LIBRARIES "" +) TARGET_LINK_LIBRARIES (OTBTesting OTBBasicFilters OTBIO OTBCommon ITKBasicFilters) IF(OTB_LIBRARY_PROPERTIES) SET_TARGET_PROPERTIES(OTBTesting PROPERTIES ${OTB_LIBRARY_PROPERTIES}) diff --git a/Utilities/otbossim/CMakeLists.txt b/Utilities/otbossim/CMakeLists.txt index b4dd3dbd94..e6b2ca5c74 100644 --- a/Utilities/otbossim/CMakeLists.txt +++ b/Utilities/otbossim/CMakeLists.txt @@ -139,10 +139,15 @@ IF(NOT OTB_DISABLE_UTILITIES_COMPILATION) ${ossim_projection_SRCS} ${ossim_imaging_SRCS} ${ossim_parallel_SRCS} - ${ossim_elevation_SRCS} + ${ossim_elevation_SRCS}) + SET_TARGET_PROPERTIES(otbossim + PROPERTIES + LINK_INTERFACE_LIBRARIES "" + ) # TARGET_LINK_LIBRARIES(otbossim ${GDAL_LIBRARY})#To make sure that gdal appear before geotiff -# TARGET_LINK_LIBRARIES(otbossim ${TIFF_LIBRARY} ${GEOTIFF_LIBRARY} ${JPEG_LIBRARY} ${OPENTHREADS_LIBRARY}) +# TARGET_LINK_LIBRARIES(otbossim ${JPEG_LIBRARY} ${TIFF_LIBRARY} ${GEOTIFF_LIBRARY} ${OPENTHREADS_LIBRARY}) + TARGET_LINK_LIBRARIES(otbossim ${OPENTHREADS_LIBRARY}) IF(NOT OTB_INSTALL_NO_LIBRARIES) INSTALL(TARGETS otbossim -- GitLab