@@ -224,6 +224,36 @@ All cached entries can be viewed using ``cmake -LAH`` from a build directory.
224
224
`CMAKE_SKIP_INSTALL_RPATH <https://cmake.org/cmake/help/latest/variable/CMAKE_SKIP_INSTALL_RPATH.html >`__
225
225
variable is not set.
226
226
227
+ Resource files embedding
228
+ ++++++++++++++++++++++++
229
+
230
+ Starting with GDAL 3.11, if a C23-compatible compiler is used, such as
231
+ clang >= 19 or GCC >= 15, it is possible to embed resource files inside
232
+ the GDAL library, without relying on resource files to be available on the file
233
+ system (such resource files are located through an hard-coded
234
+ path at build time in ``${CMAKE_INSTALL_PREFIX}/share/gdal ``, or at run-time
235
+ through the :config: `GDAL_DATA ` configuration option).
236
+
237
+ The following CMake options control that behavior:
238
+
239
+ .. option :: EMBED_RESOURCE_FILES=ON/OFF
240
+
241
+ .. versionadded :: 3.11
242
+
243
+ Default is OFF for shared library builds (BUILD_SHARED_LIBS=ON), and ON
244
+ for static library builds (BUILD_SHARED_LIBS=OFF).
245
+ When ON, resource files needed by GDAL will be embedded into the GDAL library
246
+ and/or relevant plugins.
247
+
248
+ .. option :: USE_ONLY_EMBEDDED_RESOURCE_FILES=ON/OFF
249
+
250
+ .. versionadded :: 3.11
251
+
252
+ Even if EMBED_RESOURCE_FILES=ON, GDAL will still try to locate resource
253
+ files on the file system by default , and fallback to the embedded version if
254
+ not found. By setting USE_ONLY_EMBEDDED_RESOURCE_FILES=ON, no attempt
255
+ at locating resource files on the file system is made. Default is OFF.
256
+
227
257
CMake package dependent options
228
258
+++++++++++++++++++++++++++++++
229
259
0 commit comments