- bearssl, c-ares, gss, libpsl, libssh2, mbedtls: Before this patch these Find modules returned results via `<NAME>_INCLUDE_DIR` and `<NAME>_LIBRARY`. This patch makes them return `<NAME>_INCLUDE_DIRS` (note the `S`) and `<NAME>_LIBRARIES` like other modules already did. - bearssl, mbedtls: Before this patch these Find modules allowed custom configuration via `<NAME>_INCLUDE_DIRS` (note the `S`). This patch makes them accept `<NAME>_INCLUDE_DIR`, like the rest of the modules did. Deprecate the old variables, but keep accepting them for compatibility. - bearssl: add missing `mark_as_advanced()` call. Closes #14542
49 lines
1.6 KiB
CMake
49 lines
1.6 KiB
CMake
#***************************************************************************
|
|
# _ _ ____ _
|
|
# Project ___| | | | _ \| |
|
|
# / __| | | | |_) | |
|
|
# | (__| |_| | _ <| |___
|
|
# \___|\___/|_| \_\_____|
|
|
#
|
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
#
|
|
# This software is licensed as described in the file COPYING, which
|
|
# you should have received as part of this distribution. The terms
|
|
# are also available at https://curl.se/docs/copyright.html.
|
|
#
|
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
# copies of the Software, and permit persons to whom the Software is
|
|
# furnished to do so, under the terms of the COPYING file.
|
|
#
|
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
# KIND, either express or implied.
|
|
#
|
|
# SPDX-License-Identifier: curl
|
|
#
|
|
###########################################################################
|
|
# Find the c-ares library
|
|
#
|
|
# Result Variables:
|
|
#
|
|
# CARES_FOUND System has c-ares
|
|
# CARES_INCLUDE_DIRS The c-ares include directories
|
|
# CARES_LIBRARIES The c-ares library names
|
|
|
|
find_path(CARES_INCLUDE_DIR "ares.h")
|
|
|
|
find_library(CARES_LIBRARY NAMES ${CARES_NAMES} "cares")
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(CARES
|
|
REQUIRED_VARS
|
|
CARES_INCLUDE_DIR
|
|
CARES_LIBRARY
|
|
)
|
|
|
|
if(CARES_FOUND)
|
|
set(CARES_INCLUDE_DIRS ${CARES_INCLUDE_DIR})
|
|
set(CARES_LIBRARIES ${CARES_LIBRARY})
|
|
endif()
|
|
|
|
mark_as_advanced(CARES_INCLUDE_DIR CARES_LIBRARY)
|