gdal
gdal copied to clipboard
Build: add infrastructure to build drivers as plugins against an existing libgdal, and apply it to OCI, MrSID and JP2KAK drivers
Inspired from PDAL's STANDALONE mode.
This is a new mode. It is still possible to build those drivers either embedded in libgdal, or as plugins as part of a full GDAL build.
Doc addition for OCI driver:
Standalone plugin compilation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 3.10
While this driver may be built as part of a whole GDAL build, either in libgdal
itself, or as a plugin, it is also possible to only build this driver as a plugin,
against an already built libgdal.
The version of the GDAL sources used to build the driver must match the version
of the libgdal it is built against.
For example, from a "build_oci" directory under the root of the GDAL source tree:
::
cmake -S ../ogr/ogrsf_frmts/oci -DCMAKE_PREFIX_PATH=/path/to/GDAL_installation_prefix -DOracle_ROOT=/path/to/instantclient_sdk_root
cmake --build .
Note that such a plugin, when used against a libgdal not aware of it, will be
systematically loaded at GDAL driver initialization time, and will not benefit from
`deferred plugin loading capabilities <rfc-96>`. For that, libgdal itself must be built with the
CMake variable OGR_REGISTER_DRIVER_OCI_FOR_LATER_PLUGIN=ON set.