Skip to content
Snippets Groups Projects
Commit 50e1cd8f authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

Merge branch 'develop' of https://git.orfeo-toolbox.org/git/otb into develop

parents 677eff60 5999005e
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,8 @@ otb_module(OTBCommon
DEPENDS
OTBBoost
OTBITK
#Add dependency to OTBGDAL as GDAL module need to set OTB_USE_GDAL_20 before configuring otbConfigure.h
OTBGDAL
TEST_DEPENDS
OTBImageBase
......
......@@ -3,7 +3,4 @@ project(OTBGDAL)
set(OTBGDAL_SYSTEM_INCLUDE_DIRS ${GDAL_INCLUDE_DIRS})
set(OTBGDAL_LIBRARIES "${GDAL_LIBRARIES}")
set(GDAL_CONFIG_CHECKING ON CACHE BOOL "Tests to check gdal config." FORCE)
mark_as_advanced(GDAL_CONFIG_CHECKING)
otb_module_impl()
......@@ -8,6 +8,10 @@ if(NOT GDAL_FOUND)
message(FATAL_ERROR "Cannot find GDAL. Set GDAL_INCLUDE_DIR and GDAL_LIBRARY")
endif()
#Allow to deactivate GDAL checking (done by default)
set(GDAL_CONFIG_CHECKING ON CACHE BOOL "Tests to check gdal config." FORCE)
mark_as_advanced(GDAL_CONFIG_CHECKING)
if(GDAL_CONFIG_CHECKING)
set(MIN_MAJOR_VERSION 1)
set(MIN_MINOR_VERSION 10)
......@@ -89,7 +93,7 @@ if(GDAL_CONFIG_CHECKING)
file(READ "${TEMP}/gdalVersion.txt" DETECTED_VERSION)
string(SUBSTRING ${DETECTED_VERSION} 0 2 VER2)
if(${VER2} EQUAL "2.")
message("-- Gdal >= 2.0.0 detected")
message(STATUS "Gdal >= 2.0.0 detected")
set(OTB_USE_GDAL_20 true CACHE INTERNAL "True if GDAL >= 2.0.0 has been detected" FORCE )
else(${VER2} EQUAL "2.")
set(OTB_USE_GDAL_20 false CACHE INTERNAL "True if GDAL >= 2.0.0 has been detected" FORCE )
......
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