cmake/FindGSS: prioritize MIT over GNU in pkg-config detection

To match the non-pkg-config path, and also suspected user expectation.

This comes with a small incompatibility in return for more consistency.

Bug: https://github.com/curl/curl/pull/22052#discussion_r3422424979
Follow-up to 9e19a577eb #15176

Closes #22053
This commit is contained in:
Viktor Szakats 2026-06-16 18:52:45 +02:00
parent be8f24323e
commit aacb90bee9
No known key found for this signature in database

View file

@ -51,7 +51,7 @@ set(_gss_LIBRARY_DIRS "")
if(NOT GSS_ROOT_DIR AND NOT "$ENV{GSS_ROOT_DIR}")
if(CURL_USE_PKGCONFIG)
find_package(PkgConfig QUIET)
pkg_search_module(_gss ${_gnu_modname} ${_mit_modname})
pkg_search_module(_gss ${_mit_modname} ${_gnu_modname})
list(APPEND _gss_root_hints "${_gss_PREFIX}")
set(_gss_version "${_gss_VERSION}")
endif()