1 #***************************************************************************
3 # Project ___| | | | _ \| |
5 # | (__| |_| | _ <| |___
6 # \___|\___/|_| \_\_____|
8 # Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
10 # This software is licensed as described in the file COPYING, which
11 # you should have received as part of this distribution. The terms
12 # are also available at https://curl.se/docs/copyright.html.
14 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 # copies of the Software, and permit persons to whom the Software is
16 # furnished to do so, under the terms of the COPYING file.
18 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 # KIND, either express or implied.
21 # SPDX-License-Identifier: curl
23 ###########################################################################
25 #[=======================================================================[.rst:
29 Find the nghttp3 library
36 ``NGHTTP3_INCLUDE_DIRS``
37 The nghttp3 include directories.
39 The libraries needed to use nghttp3
42 #]=======================================================================]
45 find_package(PkgConfig QUIET)
46 pkg_search_module(PC_NGHTTP3 libnghttp3)
49 find_path(NGHTTP3_INCLUDE_DIR nghttp3/nghttp3.h
51 ${PC_NGHTTP3_INCLUDEDIR}
52 ${PC_NGHTTP3_INCLUDE_DIRS}
55 find_library(NGHTTP3_LIBRARY NAMES nghttp3
58 ${PC_NGHTTP3_LIBRARY_DIRS}
61 if(PC_NGHTTP3_VERSION)
62 set(NGHTTP3_VERSION ${PC_NGHTTP3_VERSION})
65 include(FindPackageHandleStandardArgs)
66 find_package_handle_standard_args(NGHTTP3
70 VERSION_VAR NGHTTP3_VERSION
74 set(NGHTTP3_LIBRARIES ${NGHTTP3_LIBRARY})
75 set(NGHTTP3_INCLUDE_DIRS ${NGHTTP3_INCLUDE_DIR})
78 mark_as_advanced(NGHTTP3_INCLUDE_DIRS NGHTTP3_LIBRARIES)