[gdal-dev] Build static GDAL-Lib and static GDAL-Apps

Robert Coup robert.coup at koordinates.com
Wed Feb 21 03:42:04 PST 2024


Hi,

On Wed, 21 Feb 2024 at 11:18, Michael Otto <michael.otto at data-experts.de>
wrote:

>
> I've also tried the problem with libtiff, but couldn't solve it. Thanks
> for the tip!



With "gdal[core,tools]" the apps are now static.


Excellent.


> BUT I want to use exactly what is still causing problems: SQLite for the
> creation of MBTiles (possibly GPKG) .


Inevitably!


> Is there perhaps still a possibility to use SQLite3 in the static apps if
> I continue my first attempt without vcpkg?


I think it's possible: I chucked away my test container, but I vaguely
recall it was in something in the sqlite ogr driver labelled "test"?
There's a couple defined at the end of
ogr/ogrsf_frmts/sqlite/CMakeLists.txt — it's possible commenting those
blocks out will make the compile complete with [core,tools,sqlite3].  There
may be some downsides: I don't know off the top of my head how the GDAL
SQLite/GPKG integration works wrt exposing the necessary GDAL functions
into SQLite. It might just work though :-)

You'll need to:
* copy the vcpkg/ports/gdal/ dir to custom-ports/gdal/
* add a patch with the change to the sqlite CMakeLists.txt file
* add your patch name to the top of custom-ports/gdal/portfile.cmake

You *probably* want to add [geos,png] as well. That might throw up some
more fun.

Rob :)

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240221/27b60165/attachment.htm>


More information about the gdal-dev mailing list