]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: add CURL_USE_GSASL option with detection + CI test
authorTal Regev <tal.regev@gmail.com>
Fri, 14 Jun 2024 05:09:55 +0000 (08:09 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 17 Jun 2024 21:10:02 +0000 (23:10 +0200)
Reviewed-by: Viktor Szakats
Closes #13948

.github/workflows/macos.yml
CMakeLists.txt
lib/curl_config.h.cmake

index 0ff24eaa0ad01f71b7d5e5ab05b9cf0e9d104ed7..157cbf65f4399f226ae26ebbe7861f60783ed146 100644 (file)
@@ -220,8 +220,8 @@ jobs:
           - CC: gcc-12
         build:
           - name: OpenSSL
-            install: nghttp2 openssl
-            generate: -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9
+            install: nghttp2 openssl gsasl
+            generate: -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DCURL_USE_GSASL=ON
           - name: LibreSSL
             install: nghttp2 libressl
             generate: -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DBUILD_EXAMPLES=ON
index 76563a236552ba2b9815ffd098f69bd1d6950e73..2b778beed0b4411668aade20a2a412709a397848 100644 (file)
@@ -980,6 +980,15 @@ if(NOT USE_LIBSSH2 AND CURL_USE_LIBSSH)
   endif()
 endif()
 
+option(CURL_USE_GSASL "Use GSASL implementation" OFF)
+mark_as_advanced(CURL_USE_GSASL)
+if(CURL_USE_GSASL)
+  find_package(PkgConfig REQUIRED)
+  pkg_check_modules(GSASL REQUIRED libgsasl)
+  list(APPEND CURL_LIBS ${GSASL_LINK_LIBRARIES})
+  set(USE_GSASL ON)
+endif()
+
 option(CURL_USE_GSSAPI "Use GSSAPI implementation (right now only Heimdal is supported with CMake build)" OFF)
 mark_as_advanced(CURL_USE_GSSAPI)
 
@@ -1644,6 +1653,7 @@ if(NOT CURL_DISABLE_INSTALL)
   _add_if("UnixSockets"   USE_UNIX_SOCKETS)
   _add_if("libz"          HAVE_LIBZ)
   _add_if("brotli"        HAVE_BROTLI)
+  _add_if("gsasl"         USE_GSASL)  
   _add_if("zstd"          HAVE_ZSTD)
   _add_if("AsynchDNS"     USE_ARES OR USE_THREADS_POSIX OR USE_THREADS_WIN32)
   _add_if("IDN"           HAVE_LIBIDN2 OR USE_WIN32_IDN OR USE_APPLE_IDN)
index 799d31f3c45092160e209efc971361adaf90fcd6..b2173fb38875b034128b5759934df09407582fbf 100644 (file)
@@ -719,6 +719,9 @@ ${SIZEOF_TIME_T_CODE}
 /* if librtmp/rtmpdump is in use */
 #cmakedefine USE_LIBRTMP 1
 
+/* if GSASL is in use */
+#cmakedefine USE_GSASL 1
+
 /* Define to 1 if you don't want the OpenSSL configuration to be loaded
    automatically */
 #cmakedefine CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG 1