diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake index a45157f6e..b5f38279e 100644 --- a/cmake/OpenCVFindLibsGrfmt.cmake +++ b/cmake/OpenCVFindLibsGrfmt.cmake @@ -208,5 +208,6 @@ if(WITH_GDAL) set(HAVE_GDAL NO) else() set(HAVE_GDAL YES) + ocv_include_directories(${GDAL_INCLUDE_DIR}) endif() endif() diff --git a/modules/imgcodecs/src/grfmt_gdal.hpp b/modules/imgcodecs/src/grfmt_gdal.hpp index 73d39c947..027396049 100644 --- a/modules/imgcodecs/src/grfmt_gdal.hpp +++ b/modules/imgcodecs/src/grfmt_gdal.hpp @@ -52,9 +52,9 @@ #include /// Geospatial Data Abstraction Library -#include -#include -#include +#include +#include +#include /// Start of CV Namespace