Skip to content
Snippets Groups Projects
Commit cb843063 authored by Mickael Savinaud's avatar Mickael Savinaud
Browse files

ENH: solve case of WIN32 platform where gdal-config is not found

parent d825f6dd
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,7 @@ IF(OTB_USE_EXTERNAL_GDAL)
ENDIF (GDALCONFIG_EXECUTABLE)
# Detect if gdal support hdf format
IF(NOT WIN32)
FIND_PROGRAM(GDALCONFIG_EXECUTABLE gdal-config)
IF (GDALCONFIG_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${GDALCONFIG_EXECUTABLE} --formats
......@@ -55,6 +56,10 @@ IF(OTB_USE_EXTERNAL_GDAL)
ELSE (GDALCONFIG_EXECUTABLE)
MESSAGE(WARNING "gdal-config not found")
ENDIF (GDALCONFIG_EXECUTABLE)
ELSE (NOT WIN32)
# For WIN32 platform, GDAL is automatically build with HDF support.
SET(CHECK_GDAL_BUILDED_WITH_HDF 1 CACHE INTERNAL "GDAL_BUILDED_WITH_HDF" FORCE)
ENDIF (NOT WIN32)
# Find geotiff headers
FIND_PATH(GEOTIFF_INCLUDE_DIRS geotiff.h $ENV{GDAL_INCLUDE_DIR} ${GDAL_INCLUDE_DIR} /usr/include/geotiff /usr/include/libgeotiff)
......
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