Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/curl/CMake/FindCARES.cmake @ 3:2c135c81b16c
MERGE: upstream PyMuPDF 1.26.4 with MuPDF 1.26.7
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:44:09 +0200 |
| parents | b50eed0cc0ef |
| children |
comparison
equal
deleted
inserted
replaced
| 0:6015a75abc2d | 3:2c135c81b16c |
|---|---|
| 1 # - Find c-ares | |
| 2 # Find the c-ares includes and library | |
| 3 # This module defines | |
| 4 # CARES_INCLUDE_DIR, where to find ares.h, etc. | |
| 5 # CARES_LIBRARIES, the libraries needed to use c-ares. | |
| 6 # CARES_FOUND, If false, do not try to use c-ares. | |
| 7 # also defined, but not for general use are | |
| 8 # CARES_LIBRARY, where to find the c-ares library. | |
| 9 | |
| 10 find_path(CARES_INCLUDE_DIR ares.h | |
| 11 /usr/local/include | |
| 12 /usr/include | |
| 13 ) | |
| 14 | |
| 15 set(CARES_NAMES ${CARES_NAMES} cares) | |
| 16 find_library(CARES_LIBRARY | |
| 17 NAMES ${CARES_NAMES} | |
| 18 PATHS /usr/lib /usr/local/lib | |
| 19 ) | |
| 20 | |
| 21 if(CARES_LIBRARY AND CARES_INCLUDE_DIR) | |
| 22 set(CARES_LIBRARIES ${CARES_LIBRARY}) | |
| 23 set(CARES_FOUND "YES") | |
| 24 else() | |
| 25 set(CARES_FOUND "NO") | |
| 26 endif() | |
| 27 | |
| 28 | |
| 29 if(CARES_FOUND) | |
| 30 if(NOT CARES_FIND_QUIETLY) | |
| 31 message(STATUS "Found c-ares: ${CARES_LIBRARIES}") | |
| 32 endif() | |
| 33 else() | |
| 34 if(CARES_FIND_REQUIRED) | |
| 35 message(FATAL_ERROR "Could not find c-ares library") | |
| 36 endif() | |
| 37 endif() | |
| 38 | |
| 39 mark_as_advanced( | |
| 40 CARES_LIBRARY | |
| 41 CARES_INCLUDE_DIR | |
| 42 ) |
