cmake: tidy up Find modules

Smoothen out minor differences between Find modules.

- brotli, nghttp2: drop redundant `FOUND_VAR` specifiers from
  `find_package_handle_standard_args()` calls.
  This function sets both `<NAME_UPPER>_FOUND` and `<NAME>_FOUND`
  by default.

- brotli: set result vars only when found.

- brotli: add missing `mark_as_advanced()` call.

- brotli: delete custom fail message.

- mbedtls, bearssl: use `REQUIRED_VARS` instead of `DEFAULT_MSG`.

- msh3, quiche: set `<NAME>_VERSION` (via pkg-config).

- wolfssl: also use `PC_WOLFSSL_INCLUDEDIR`, `PC_WOLFSSL_LIBDIR`
  as hints.

- libpsl, libssh2, zstd: clear temporary variables used for version
  detection.

- gss, msh3, nghttp2, nghttp3, ngtcp2, quiche, zstd: fix to apply
  `mark_as_advanced()` to internal variables only.

Closes #14538
This commit is contained in:
Viktor Szakats 2024-08-13 22:31:21 +02:00
parent 5abfe451be
commit 65f5caee05
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
13 changed files with 43 additions and 23 deletions

View file

@ -37,11 +37,13 @@ endif()
find_path(WolfSSL_INCLUDE_DIR NAMES "wolfssl/ssl.h"
HINTS
${PC_WOLFSSL_INCLUDEDIR}
${PC_WOLFSSL_INCLUDE_DIRS}
)
find_library(WolfSSL_LIBRARY NAMES "wolfssl"
HINTS
${PC_WOLFSSL_LIBDIR}
${PC_WOLFSSL_LIBRARY_DIRS}
)