From 6b83aa9a408cd9307d4c662d88e8f9818b35c510 Mon Sep 17 00:00:00 2001 From: John Thacker Date: Fri, 14 Feb 2025 11:19:14 -0500 Subject: [PATCH] CMake: Use GSSAPI_INCLUDE_DIR consistently The GSSAPI find module sets GSSAPI_INCLUDE_DIR (singular) only and passes that to find_package_handle_standard_arguments, but later tests and marks as advanced GSSAPI_INCLUDE_DIRS (plural), which doesn't exist. GSSAPI_INCLUDE_DIR is what's used in src/CMakeLists.txt This hasn't had a major effect, because GSSAPI_FOUND gets set by find_package_handle_standard_args, so the if statement that tests GSSAPI_INCLUDE_DIRS (and never succeeded) would have been a no-op in any case, so remove it. Standardize on the singular version when marking as advanced. Signed-off-by: John Thacker Reviewed-by: Jakub Jelen Reviewed-by: Andreas Schneider --- cmake/Modules/FindGSSAPI.cmake | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cmake/Modules/FindGSSAPI.cmake b/cmake/Modules/FindGSSAPI.cmake index d227d8dd..037ad5eb 100644 --- a/cmake/Modules/FindGSSAPI.cmake +++ b/cmake/Modules/FindGSSAPI.cmake @@ -317,9 +317,5 @@ endif (GSSAPI_FLAVOR_HEIMDAL) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(GSSAPI DEFAULT_MSG GSSAPI_LIBRARIES GSSAPI_INCLUDE_DIR) -if (GSSAPI_INCLUDE_DIRS AND GSSAPI_LIBRARIES) - set(GSSAPI_FOUND TRUE) -endif (GSSAPI_INCLUDE_DIRS AND GSSAPI_LIBRARIES) - -# show the GSSAPI_INCLUDE_DIRS and GSSAPI_LIBRARIES variables only in the advanced view -mark_as_advanced(GSSAPI_INCLUDE_DIRS GSSAPI_LIBRARIES) +# show the GSSAPI_INCLUDE_DIR and GSSAPI_LIBRARIES variables only in the advanced view +mark_as_advanced(GSSAPI_INCLUDE_DIR GSSAPI_LIBRARIES)