You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some parts of GDAL core, but mostly drivers, depends on a number of resource files for correct execution. Locating those resource files on the filesystem can be painful in some use cases of GDAL, that involve relocating the GDAL binary at installation time. Typically GDAL embedded in Rasterio of Fiona (CC @sgillies) where GDAL_DATA must be correctly set currently. Would presumably help WASM-like usages too.
We might be able to improve that in the future by leveraging the shiny #embed pre-processor directive that has landed in the C23 standard. Basically you do something like:
Currently it is only implemented in CLang master branch (19.0dev). There's work in progress for GCC 15 I believe. MSVC will probably lag behind as often.
So we could potentially offer a EMBED_RESOURCE_FILES CMake option that would enable such feature. It would presumably no longer install the resource files, nor try to fetch them on disk.
(and we could also use that for PROJ's proj.db as well)
The text was updated successfully, but these errors were encountered:
Some parts of GDAL core, but mostly drivers, depends on a number of resource files for correct execution. Locating those resource files on the filesystem can be painful in some use cases of GDAL, that involve relocating the GDAL binary at installation time. Typically GDAL embedded in Rasterio of Fiona (CC @sgillies) where GDAL_DATA must be correctly set currently. Would presumably help WASM-like usages too.
We might be able to improve that in the future by leveraging the shiny
#embed
pre-processor directive that has landed in the C23 standard. Basically you do something like:et voila, the file is embeded at build time.
Cf the live example at Godbolt sample
Currently it is only implemented in CLang master branch (19.0dev). There's work in progress for GCC 15 I believe. MSVC will probably lag behind as often.
So we could potentially offer a EMBED_RESOURCE_FILES CMake option that would enable such feature. It would presumably no longer install the resource files, nor try to fetch them on disk.
(and we could also use that for PROJ's proj.db as well)
The text was updated successfully, but these errors were encountered: