2020-03-23 21:44:29 +08:00
|
|
|
#***************************************************************************
|
|
|
|
# _ _ ____ _
|
|
|
|
# Project ___| | | | _ \| |
|
|
|
|
# / __| | | | |_) | |
|
|
|
|
# | (__| |_| | _ <| |___
|
|
|
|
# \___|\___/|_| \_\_____|
|
|
|
|
#
|
2023-01-02 20:51:48 +08:00
|
|
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2020-03-23 21:44:29 +08:00
|
|
|
#
|
|
|
|
# This software is licensed as described in the file COPYING, which
|
|
|
|
# you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
# are also available at https://curl.se/docs/copyright.html.
|
2020-03-23 21:44:29 +08:00
|
|
|
#
|
|
|
|
# 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
|
2022-05-17 17:16:50 +08:00
|
|
|
#
|
2020-03-23 21:44:29 +08:00
|
|
|
###########################################################################
|
2024-08-05 02:35:13 +08:00
|
|
|
# Find the c-ares library
|
|
|
|
#
|
|
|
|
# Result Variables:
|
|
|
|
#
|
2024-08-14 09:09:08 +08:00
|
|
|
# CARES_FOUND System has c-ares
|
|
|
|
# CARES_INCLUDE_DIRS The c-ares include directories
|
|
|
|
# CARES_LIBRARIES The c-ares library names
|
2010-02-16 21:32:45 +08:00
|
|
|
|
2024-08-05 02:35:13 +08:00
|
|
|
find_path(CARES_INCLUDE_DIR "ares.h")
|
2011-12-30 10:36:18 +08:00
|
|
|
|
2024-08-13 16:45:37 +08:00
|
|
|
find_library(CARES_LIBRARY NAMES ${CARES_NAMES} "cares")
|
2009-07-15 03:03:31 +08:00
|
|
|
|
2020-02-24 20:34:54 +08:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(CARES
|
2024-08-05 02:35:13 +08:00
|
|
|
REQUIRED_VARS
|
|
|
|
CARES_INCLUDE_DIR
|
|
|
|
CARES_LIBRARY
|
2024-07-13 03:10:57 +08:00
|
|
|
)
|
2024-08-05 02:35:13 +08:00
|
|
|
|
2024-08-14 09:09:08 +08:00
|
|
|
if(CARES_FOUND)
|
|
|
|
set(CARES_INCLUDE_DIRS ${CARES_INCLUDE_DIR})
|
|
|
|
set(CARES_LIBRARIES ${CARES_LIBRARY})
|
|
|
|
endif()
|
|
|
|
|
2024-08-05 02:35:13 +08:00
|
|
|
mark_as_advanced(CARES_INCLUDE_DIR CARES_LIBRARY)
|