Skip to content

Commit b0a6cb4

Browse files
authored
Update gdal.cmake
1 parent 795f0d9 commit b0a6cb4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmake/gdal.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ find_package(GDAL 3.4 REQUIRED)
1616
set_package_properties(GDAL PROPERTIES TYPE REQUIRED
1717
PURPOSE "Provides general purpose raster, vector, and reference system support")
1818
if (GDAL_FOUND)
19-
gdal_find_version(GDAL_VERSION)
19+
if(NOT DEFINED GDAL_VERSION)
20+
gdal_find_version(GDAL_VERSION)
21+
endif()
2022
#
2123
# Older versions of FindGDAL.cmake don't properly set GDAL_VERSION
2224
#

0 commit comments

Comments
 (0)