Commit c700a410 authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

Ajout gestion de CURL

parent 37b58205
......@@ -103,6 +103,15 @@ ENDIF (NOT GDAL_INCLUDE_DIRS)
INCLUDE_DIRECTORIES(${GDAL_INCLUDE_DIRS})
LINK_DIRECTORIES( ${GDAL_LIBRARY_DIRS} )
#-----------------------------------------------------------------------------
INCLUDE(CheckIncludeFiles)
# Check if curl.h header file exist
CHECK_INCLUDE_FILES("curl/curl.h" OTB_HAVE_CURL_H)
IF(OTB_HAVE_CURL_H)
ADD_DEFINITIONS(-DOTB_HAVE_CURL)
ENDIF(OTB_HAVE_CURL_H)
#-----------------------------------------------------------------------------
# Option for generate Visu tools !!!
OPTION(OTB_USE_VISU_GUI "Generate Gui/Visu tools directory. If ON, find OpenGL and FLTK package." ON)
......
......@@ -2,8 +2,16 @@
FILE(GLOB OTBIO_SRCS "*.cxx" )
IF( NOT OTB_HAVE_CURL_H )
LIST(REMOVE_ITEM OTBIO_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/otbNetworkedQuadTreeImageIOFactory.cxx" )
LIST(REMOVE_ITEM OTBIO_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/otbNetworkedQuadTreeImageIO.cxx" )
ENDIF( NOT OTB_HAVE_CURL_H )
ADD_LIBRARY(OTBIO ${OTBIO_SRCS})
TARGET_LINK_LIBRARIES (OTBIO gdal OTBCommon ITKIO ITKCommon otbossim dxf)
IF( OTB_HAVE_CURL_H )
TARGET_LINK_LIBRARIES (OTBIO curl)
ENDIF( OTB_HAVE_CURL_H )
INSTALL(TARGETS OTBIO
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
......@@ -13,6 +21,11 @@ ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
IF( NOT OTB_HAVE_CURL_H )
LIST(REMOVE_ITEM __files1 "${CMAKE_CURRENT_SOURCE_DIR}/otbNetworkedQuadTreeImageIOFactory.h" )
LIST(REMOVE_ITEM __files1 "${CMAKE_CURRENT_SOURCE_DIR}/otbNetworkedQuadTreeImageIO.h" )
ENDIF( NOT OTB_HAVE_CURL_H )
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/IO
COMPONENT Development)
......
......@@ -28,7 +28,9 @@
#include "otbGDALImageIOFactory.h"
#include "otbLUMImageIOFactory.h"
#include "otbBSQImageIOFactory.h"
#ifdef OTB_HAVE_CURL
#include "otbNetworkedQuadTreeImageIOFactory.h"
#endif
namespace otb
{
......@@ -67,9 +69,10 @@ ImageIOFactory::RegisterBuiltInFactories()
// GDAL : New format for OTB
itk::ObjectFactoryBase::RegisterFactory( GDALImageIOFactory::New() );
#ifdef OTB_HAVE_CURL
// NetworkedQuadTree : New format for OTB
itk::ObjectFactoryBase::RegisterFactory( NetworkedQuadTreeImageIOFactory::New() );
#endif
firstTime = false;
}
}
......
......@@ -2,6 +2,9 @@ FILE(GLOB OTBProjections_SRCS "*.cxx" )
ADD_LIBRARY(OTBProjections ${OTBProjections_SRCS})
TARGET_LINK_LIBRARIES(OTBProjections OTBIO)
IF( OTB_HAVE_CURL_H )
TARGET_LINK_LIBRARIES (OTBProjections curl)
ENDIF( OTB_HAVE_CURL_H )
INSTALL(TARGETS OTBProjections
RUNTIME DESTINATION ${OTB_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
......@@ -11,6 +14,11 @@ ARCHIVE DESTINATION ${OTB_INSTALL_LIB_DIR} COMPONENT Development)
FILE(GLOB __files1 "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
FILE(GLOB __files2 "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
IF( NOT OTB_HAVE_CURL_H )
LIST(REMOVE_ITEM __files1 "${CMAKE_CURRENT_SOURCE_DIR}/otbPlaceNameToLonLat.h" )
LIST(REMOVE_ITEM __files2 "${CMAKE_CURRENT_SOURCE_DIR}/otbPlaceNameToLonLat.txx" )
ENDIF( NOT OTB_HAVE_CURL_H )
INSTALL(FILES ${__files1} ${__files2}
DESTINATION ${OTB_INSTALL_INCLUDE_DIR}/Projections
COMPONENT Development)
......
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