[gdal-dev] Building lightweight OGR library

Dmitry Baryshnikov polimax at mail.ru
Sat Feb 4 13:05:03 EST 2012

Hi all,

I want to build lightweight ORL library with only SHP, Mapinfo and KML 
support (and input such logic to cmake - ability to check any 
combination of libraries or drivers with cross dependent logic). But OGR 
code need several functions (GDALVersionInfo, GDALCheckVersion, etc.) 
form GDAL.
If I add the code with this functions - most of gdal lib code will added.
As Even Rouault said that GDAL without OGR is supported (this is used by 
ESRI), why the feature to build OGR without GDAL is not supported?
I can surround the other code from gdal.h and gdal_misc.cpp by #ifdef 
GDAL_ENABLED #endif (analog of OGR_ENABLED) or move this code to 
separate file.
I think there is necessity of such lightweight library (with only CPL 
and/or OGR and/or GDAL).
My general idea is that OGR lib with several main drivers depends from 
only GDALCheckVersion function from GDAL code. And also there is a 
simple solution - changing a pair of files (gdal.h and gdal_misc.cpp).
May be it make sense to provide this opportunity?

Best regards

More information about the gdal-dev mailing list