]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: fix version variable references in FindGSS
authorViktor Szakats <commit@vsz.me>
Wed, 7 Aug 2024 21:38:15 +0000 (23:38 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 7 Aug 2024 21:41:27 +0000 (23:41 +0200)
Assign the value of the variable instead of the name of the variable
when detecting GSS version via `pkg-config` on old (?) CMake.

(On recent CMake, there is an empty value in these variables.)

Closes #14445

CMake/FindGSS.cmake

index ac9403f94ebae4094a7f45e70d5a041b1fba3851..35687ab9d261db3314dcb5840218f5abf830523a 100644 (file)
@@ -255,12 +255,12 @@ else()
   if(_GSS_MODULE_NAME STREQUAL _mit_modname OR _GSS_${_mit_modname}_VERSION)  # _GSS_MODULE_NAME set since CMake 3.16
     set(GSS_FLAVOUR "MIT")
     if(NOT _GSS_VERSION)  # for old CMake versions?
-      set(_GSS_VERSION _GSS_${_mit_modname}_VERSION)
+      set(_GSS_VERSION ${_GSS_${_mit_modname}_VERSION})
     endif()
   else()
     set(GSS_FLAVOUR "Heimdal")
     if(NOT _GSS_VERSION)  # for old CMake versions?
-      set(_GSS_VERSION _GSS_${_heimdal_modname}_VERSION)
+      set(_GSS_VERSION ${_GSS_${_heimdal_modname}_VERSION})
     endif()
   endif()
 endif()