[gdal-dev] OpenJPEG JPEG2000 Driver

Even Rouault even.rouault at spatialys.com
Wed Feb 15 10:44:30 PST 2023


> In theory, BUILD_SHARED_LIBS=ON could/should cascade to all dependencies
> - you want static GDAL, good, we will assume you link it against
> static OpenJPEG, etc.

That's indeed just theory. No such thing is implemented (if that was 
implemented, it should probably be more a CMake functionality than GDAL 
doing that itself). Static linking has always a complicated story, 
especially for GDAL whose dependencies may have other dependencies in 
cascade, whatever build system you use. For some of the dependencies 
that are detected through CMake config files, the cascaded dependencies 
may be found. But that tends to be complicated & fragile, and require 
upstream of those dependencies to generate clean CMake config files. Kai 
Pastor & the vcpkg team have done great work to improve this on select 
dependencies, but that's still a in-progress area.

>
> However, I remember, I had to modify the old NMAKE makefile to make
> GDAL link against
> static curl and a few others I did build as static libraries, e.g.
> forcing those deps as static-s
> and adding list of dependencies of those dependencies, etc.
> So, I'd say hacking build config for uncommon builds nothing buggy or
> unexpected.
Yep
>
> Best regards.

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list