From: Tal Regev Date: Fri, 14 Jun 2024 05:09:55 +0000 (+0300) Subject: cmake: add CURL_USE_GSASL option with detection + CI test X-Git-Tag: curl-8_9_0~224 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=66bf995d1cfc59b985ad02b0eab20b8ee5a9efd4;p=thirdparty%2Fcurl.git cmake: add CURL_USE_GSASL option with detection + CI test Reviewed-by: Viktor Szakats Closes #13948 --- diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0ff24eaa0a..157cbf65f4 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 76563a2365..2b778beed0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index 799d31f3c4..b2173fb388 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -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