The FindGDAL module is deprecated
Deprecated as of 2025-03-27. Replacement: find_package(GDAL CONFIG) using GDAL’s upstream CMake package. Source: CMake 4.0 release notes (FindGDAL deprecated).
Check a version:
evergreen check pkg:generic/cmake-module/find-gdal
CMake 4.0 deprecated the FindGDAL module in favor of upstream GDAL’s official CMake package configuration file. Projects should call find_package(GDAL CONFIG) instead. CMake 4.0.0 was published on 2025-03-27.
Look up another package or runtime · <form action="../lookup.html" method="get" role="search"> </form>
| Status | Deprecated |
| Severity | medium |
| Ecosystem | cpp |
| Component | pkg:generic/cmake-module/find-gdal |
| Affected versions | vers:semver/* |
| Date from the source | 2025-03-27 |
| Replacement | find_package(GDAL CONFIG) using GDAL’s upstream CMake package |
| Evidence last seen | 2026-10-19 |
| Reviewed | 2026-10-19 by arminazimi |
| Review due | 2027-04-17 (180 days after the last review) |
| Rule ID | cpp.cmake.module.find-gdal.deprecated |
Sources
- CMake 4.0 release notes (FindGDAL deprecated) (accessed 2026-10-19)
- FindGDAL module documentation (accessed 2026-10-19)
Migration
Constraints
- Confirm the GDAL install that the project uses ships a CONFIG package before dropping FindGDAL.
- Target and variable names may differ between FindGDAL and the upstream CONFIG package; update link lines to match.
Steps
- Switch to find_package(GDAL CONFIG). Replace find_package(GDAL) / include(FindGDAL) with find_package(GDAL CONFIG) and link the imported targets the upstream package exports.
Verification
cmake -S . -B build && cmake --build build: Configure and build after the GDAL find_package change.
Detected by
The cpp detector. See Detectors and Compatibility.
Related
Same ecosystem
- The Visual Studio 12 2013 generator is removed
- The CMakeFindFrameworks module is deprecated
- CMake policy versions older than 3.10 are deprecated
- CMake policy versions older than 3.5 are removed
Data
This page is generated from registry/cpp.json, rule cpp.cmake.module.find-gdal.deprecated, in the ebb.registry.v2 format (how rules are written). A CLE (ECMA-428) export is not published yet. The same facts are embedded in this page as schema.org structured data.
Last updated