]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: move GSS init before feature detections
authorViktor Szakats <commit@vsz.me>
Mon, 23 Dec 2024 00:44:06 +0000 (01:44 +0100)
committerViktor Szakats <commit@vsz.me>
Tue, 24 Dec 2024 00:21:38 +0000 (01:21 +0100)
To sync up with other dependency initializations.

Closes #15809

CMakeLists.txt

index d60a77100b0de27bbe88d6c98a2a0310e42a2995..3400327b50557a434782475eebda6acd445409f6 100644 (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()