Skip to content

Commit

Permalink
cmake: move GSS init before feature detections
Browse files Browse the repository at this point in the history
To sync up with other dependency initializations.

Closes curl#15809
  • Loading branch information
vszakats committed Dec 24, 2024
1 parent 8229711 commit f5d0ba0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit f5d0ba0

Please sign in to comment.