mirror of
https://github.com/curl/curl.git
synced 2025-09-11 14:42:40 +03:00
cmake: drop redundant FOUND checks (libgsasl, libssh, libuv)
With `find_package(... REQUIRED)` the configuration fails and exits if the package is not found. The `..._FOUND` check afterwards always evaluates true and safe to delete. Also true for brotli and zstd, but those are addressed differently via #15431. Closes #15465
This commit is contained in:
parent
f58342ae21
commit
05ba353435
|
@ -1173,7 +1173,6 @@ option(CURL_USE_LIBSSH "Use libssh" OFF)
|
||||||
mark_as_advanced(CURL_USE_LIBSSH)
|
mark_as_advanced(CURL_USE_LIBSSH)
|
||||||
if(NOT USE_LIBSSH2 AND CURL_USE_LIBSSH)
|
if(NOT USE_LIBSSH2 AND CURL_USE_LIBSSH)
|
||||||
find_package(Libssh REQUIRED)
|
find_package(Libssh REQUIRED)
|
||||||
if(LIBSSH_FOUND)
|
|
||||||
list(APPEND CURL_LIBS ${LIBSSH_LIBRARIES})
|
list(APPEND CURL_LIBS ${LIBSSH_LIBRARIES})
|
||||||
list(APPEND CURL_LIBDIRS ${LIBSSH_LIBRARY_DIRS})
|
list(APPEND CURL_LIBDIRS ${LIBSSH_LIBRARY_DIRS})
|
||||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libssh")
|
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libssh")
|
||||||
|
@ -1184,7 +1183,6 @@ if(NOT USE_LIBSSH2 AND CURL_USE_LIBSSH)
|
||||||
endif()
|
endif()
|
||||||
set(USE_LIBSSH ON)
|
set(USE_LIBSSH ON)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
# wolfSSH
|
# wolfSSH
|
||||||
option(CURL_USE_WOLFSSH "Use wolfSSH" OFF)
|
option(CURL_USE_WOLFSSH "Use wolfSSH" OFF)
|
||||||
|
@ -1207,7 +1205,6 @@ option(CURL_USE_GSASL "Use libgsasl" OFF)
|
||||||
mark_as_advanced(CURL_USE_GSASL)
|
mark_as_advanced(CURL_USE_GSASL)
|
||||||
if(CURL_USE_GSASL)
|
if(CURL_USE_GSASL)
|
||||||
find_package(Libgsasl REQUIRED)
|
find_package(Libgsasl REQUIRED)
|
||||||
if(LIBGSASL_FOUND)
|
|
||||||
list(APPEND CURL_LIBS ${LIBGSASL_LIBRARIES})
|
list(APPEND CURL_LIBS ${LIBGSASL_LIBRARIES})
|
||||||
list(APPEND CURL_LIBDIRS ${LIBGSASL_LIBRARY_DIRS})
|
list(APPEND CURL_LIBDIRS ${LIBGSASL_LIBRARY_DIRS})
|
||||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libgsasl")
|
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libgsasl")
|
||||||
|
@ -1218,7 +1215,6 @@ if(CURL_USE_GSASL)
|
||||||
endif()
|
endif()
|
||||||
set(USE_GSASL ON)
|
set(USE_GSASL ON)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
option(CURL_USE_GSSAPI "Use GSSAPI implementation" OFF)
|
option(CURL_USE_GSSAPI "Use GSSAPI implementation" OFF)
|
||||||
mark_as_advanced(CURL_USE_GSSAPI)
|
mark_as_advanced(CURL_USE_GSSAPI)
|
||||||
|
@ -1284,7 +1280,6 @@ if(CURL_USE_LIBUV)
|
||||||
message(FATAL_ERROR "Using libuv without debug support enabled is useless")
|
message(FATAL_ERROR "Using libuv without debug support enabled is useless")
|
||||||
endif()
|
endif()
|
||||||
find_package(Libuv REQUIRED)
|
find_package(Libuv REQUIRED)
|
||||||
if(LIBUV_FOUND)
|
|
||||||
list(APPEND CURL_LIBS ${LIBUV_LIBRARIES})
|
list(APPEND CURL_LIBS ${LIBUV_LIBRARIES})
|
||||||
list(APPEND CURL_LIBDIRS ${LIBUV_LIBRARY_DIRS})
|
list(APPEND CURL_LIBDIRS ${LIBUV_LIBRARY_DIRS})
|
||||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libuv")
|
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libuv")
|
||||||
|
@ -1296,7 +1291,6 @@ if(CURL_USE_LIBUV)
|
||||||
set(USE_LIBUV ON)
|
set(USE_LIBUV ON)
|
||||||
set(HAVE_UV_H ON)
|
set(HAVE_UV_H ON)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
option(USE_LIBRTMP "Enable librtmp from rtmpdump" OFF)
|
option(USE_LIBRTMP "Enable librtmp from rtmpdump" OFF)
|
||||||
if(USE_LIBRTMP)
|
if(USE_LIBRTMP)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user