curl/CMake/FindCARES.cmake

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.6 KiB
CMake
Raw Normal View History

#***************************************************************************
# _ _ ____ _
# 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
2020-11-04 21:02:01 +08:00
# 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
2010-02-16 21:32:45 +08:00
find_path(CARES_INCLUDE_DIR "ares.h")
2011-12-30 10:36:18 +08:00
find_library(CARES_LIBRARY NAMES ${CARES_NAMES} "cares")
2009-07-15 03:03:31 +08:00
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)