Merge pull request #5166 from informatimago/detect-kerberos-version
cmake: made FindGSSAPI.cmake able to detect kerberos versions such as…
This commit is contained in:
commit
442ba916bf
@ -428,11 +428,15 @@ if(GSS_FLAVOUR STREQUAL "MIT")
|
||||
string(REGEX REPLACE "\\." "" GSS_VERSION_MAJOR "${GSS_VERSION_MAJOR}")
|
||||
string(REGEX MATCH "\\.([0-9]+)$" GSS_VERSION_MINOR ${GSS_RELEASE_NUMBER})
|
||||
if(NOT GSS_VERSION_MINOR)
|
||||
string(REGEX MATCH "\\.([0-9]+)\\." GSS_VERSION_MINOR ${GSS_RELEASE_NUMBER})
|
||||
string(REGEX MATCH "\\.([0-9]+)[-\\.]" GSS_VERSION_MINOR ${GSS_RELEASE_NUMBER})
|
||||
string(REGEX REPLACE "\\." "" GSS_VERSION_MINOR "${GSS_VERSION_MINOR}")
|
||||
string(REGEX REPLACE "\\." "" GSS_VERSION_MINOR "${GSS_VERSION_MINOR}")
|
||||
string(REGEX MATCH "([0-9]+)$" GSS_VERSION_PATCH ${GSS_RELEASE_NUMBER})
|
||||
string(REGEX REPLACE "-" "" GSS_VERSION_MINOR "${GSS_VERSION_MINOR}")
|
||||
string(REGEX MATCH "\\.([0-9]+)$" GSS_VERSION_PATCH "${GSS_RELEASE_NUMBER}")
|
||||
string(REGEX REPLACE "\\." "" GSS_VERSION_PATCH "${GSS_VERSION_PATCH}")
|
||||
if(NOT GSS_VERSION_PATCH)
|
||||
set(GSS_VERSION_PATCH "0")
|
||||
endif()
|
||||
else()
|
||||
string(REGEX REPLACE "\\." "" GSS_VERSION_MINOR "${GSS_VERSION_MINOR}")
|
||||
set(GSS_VERSION_PATCH "0")
|
||||
@ -443,6 +447,7 @@ if(GSS_FLAVOUR STREQUAL "MIT")
|
||||
else()
|
||||
message(SEND_ERROR "Failed to retrieved Kerberos version number")
|
||||
endif()
|
||||
message(STATUS "Located Kerberos ${GSS_VERSION_MAJOR}.${GSS_VERSION_MINOR}.${GSS_VERSION_PATCH}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(GSS_INCLUDE_DIR GSS_LIBRARIES)
|
||||
|
Loading…
Reference in New Issue
Block a user