[gdal-dev] Where to fins my own files

Even Rouault even.rouault at spatialys.com
Wed Jan 17 08:12:41 PST 2024


Abel,

Le 17/01/2024 à 15:50, Abel Pau a écrit :
>
> Hi,
>
> ok Even,
>
> so, as my driver is not already online I have to do some changes at 
> this part of the code, don’t I?
>
> At this moment I have the file in the folder GDAL\data (my GDAL_DATA 
> environment variable).
>
> I call it like that.
>
> aMMIDDBFFile=CPLFindFile("gdal", "MM_m_idofic.csv");
>
> Do I have to move the file to somewhere? where?
>
I've merged the PR, so you can rebase on top of latest master

No change required in your .cpp file

The only change is to move the resource file into a data/ subdirectory 
within your ogr/ogrsf_frmts/XXXX driver directory

and add in ogr/ogrsf_frmts/XXX/CMakeLists.txt


set(GDAL_DATA_FILES
     ${CMAKE_CURRENT_SOURCE_DIR}/data/MM_m_idofic.csv
)
set_property(
   TARGET ${GDAL_LIB_TARGET_NAME}
   APPEND
   PROPERTY RESOURCE "${GDAL_DATA_FILES}")

Even


-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240117/4a5ff787/attachment.htm>


More information about the gdal-dev mailing list