1 # Find the system's Nghttp3 includes and library
3 # NGHTTP3_INCLUDE_DIRS - where to find nghttp3.h
4 # NGHTTP3_LIBRARIES - List of libraries when using nghttp3
5 # NGHTTP3_FOUND - True if nghttp3 found
6 # NGHTTP3_DLL_DIR - (Windows) Path to the Nghttp2 DLL
7 # NGHTTP3_DLL - (Windows) Name of the Nghttp2 DLL
9 include( FindWSWinLibs )
10 FindWSWinLibs( "nghttp3-.*" "NGHTTP3_HINTS" )
13 find_package(PkgConfig)
14 pkg_search_module(NGHTTP3 libnghttp3)
17 find_path( NGHTTP3_INCLUDE_DIR
18 NAMES nghttp3/nghttp3.h
20 "${NGHTTP3_INCLUDEDIR}"
21 "${NGHTTP3_HINTS}/include"
22 PATHS /usr/local/include /usr/include
25 find_library( NGHTTP3_LIBRARY
29 "${NGHTTP3_HINTS}/lib"
30 PATHS /usr/local/lib /usr/lib
33 include( FindPackageHandleStandardArgs )
34 find_package_handle_standard_args( NGHTTP3 DEFAULT_MSG NGHTTP3_LIBRARY NGHTTP3_INCLUDE_DIR )
37 set( NGHTTP3_INCLUDE_DIRS ${NGHTTP3_INCLUDE_DIR} )
38 set( NGHTTP3_LIBRARIES ${NGHTTP3_LIBRARY} )
40 set ( NGHTTP3_DLL_DIR "${NGHTTP3_HINTS}/bin"
41 CACHE PATH "Path to nghttp3 DLL"
43 file( GLOB _nghttp3_dll RELATIVE "${NGHTTP3_DLL_DIR}"
44 "${NGHTTP3_DLL_DIR}/nghttp3.dll"
46 set ( NGHTTP3_DLL ${_nghttp3_dll}
47 CACHE FILEPATH "nghttp3 DLL file name"
49 file( GLOB _nghttp3_pdb RELATIVE "${NGHTTP3_DLL_DIR}"
50 "${NGHTTP3_DLL_DIR}/nghttp3.pdb"
52 set ( NGHTTP3_PDB ${_nghttp3_pdb}
53 CACHE FILEPATH "nghttp3 PDB file name"
55 mark_as_advanced( NGHTTP3_DLL_DIR NGHTTP3_DLL NGHTTP3_PDB )
58 set( NGHTTP3_INCLUDE_DIRS )
59 set( NGHTTP3_LIBRARIES )
62 mark_as_advanced( NGHTTP3_LIBRARIES NGHTTP3_INCLUDE_DIRS )