cmake: move GSS init before feature detections

To sync up with other dependency initializations.

Closes #15809
This commit is contained in:
Viktor Szakats 2024-12-23 01:44:06 +01:00
parent 822971170c
commit f5d0ba0e75
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -1296,6 +1296,15 @@ if(CURL_USE_GSSAPI)
set(HAVE_GSSAPI ${GSS_FOUND})
if(GSS_FOUND)
list(APPEND CURL_LIBS ${GSS_LIBRARIES})
list(APPEND CURL_LIBDIRS ${GSS_LIBRARY_DIRS})
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${GSS_PC_REQUIRES})
include_directories(SYSTEM ${GSS_INCLUDE_DIRS})
link_directories(${GSS_LIBRARY_DIRS})
if(GSS_CFLAGS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GSS_CFLAGS}")
endif()
if(GSS_FLAVOUR STREQUAL "GNU")
set(HAVE_GSSGNU 1)
else()
@ -1331,15 +1340,6 @@ if(CURL_USE_GSSAPI)
unset(_include_list)
cmake_pop_check_state()
endif()
list(APPEND CURL_LIBS ${GSS_LIBRARIES})
list(APPEND CURL_LIBDIRS ${GSS_LIBRARY_DIRS})
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${GSS_PC_REQUIRES})
include_directories(SYSTEM ${GSS_INCLUDE_DIRS})
link_directories(${GSS_LIBRARY_DIRS})
if(GSS_CFLAGS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GSS_CFLAGS}")
endif()
else()
message(WARNING "GSSAPI has been requested, but no supporting libraries found. Skipping.")
endif()