diff options
author | Balint Reczey <balint@balintreczey.hu> | 2016-08-26 15:18:29 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-10-13 19:26:10 +0000 |
commit | b1cc056b12702435f6ebdc6ba0a8e17a41e159a0 (patch) | |
tree | e03028577c61da59952dd3c319aff62faf917a14 /cmake | |
parent | ad0a016bd2f7f82e4db8bbac13f959ad3bc7ecf4 (diff) |
Remove nghttp2 code and use system' nghttp2
Update debian, macos (setup / homebrew) download script
Update testsuite (don't try HPACK when build without nghttp2)
Change-Id: I365e5e17bc4fab4acd81b4c39ea7189a5d1ee112
Reviewed-on: https://code.wireshark.org/review/17347
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindNGHTTP2.cmake | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/cmake/modules/FindNGHTTP2.cmake b/cmake/modules/FindNGHTTP2.cmake new file mode 100644 index 0000000000..f0088bebb3 --- /dev/null +++ b/cmake/modules/FindNGHTTP2.cmake @@ -0,0 +1,55 @@ +# Find the system's Nghttp2 includes and library +# +# NGHTTP2_INCLUDE_DIRS - where to find nghttp2.h +# NGHTTP2_LIBRARIES - List of libraries when using nghttp2 +# NGHTTP2_FOUND - True if nghttp2 found +# NGHTTP2_DLL_DIR - (Windows) Path to the Nghttp2 DLL +# NGHTTP2_DLL - (Windows) Name of the Nghttp2 DLL + +include( FindWSWinLibs ) +FindWSWinLibs( "nghttp2-.*" "NGHTTP2_HINTS" ) + +find_package(PkgConfig) +pkg_search_module(NGHTTP2 libnghttp2) + +find_path( NGHTTP2_INCLUDE_DIR + NAMES nghttp2/nghttp2.h + HINTS + "${NGHTTP2_INCLUDEDIR}" + "${NGHTTP2_HINTS}/include" + PATHS /usr/local/include /usr/include +) + +find_library( NGHTTP2_LIBRARY + NAMES nghttp2 + HINTS + "${NGHTTP2_LIBDIR}" + "${NGHTTP2_HINTS}/lib" + PATHS /usr/local/lib /usr/lib +) + +include( FindPackageHandleStandardArgs ) +find_package_handle_standard_args( Nghttp2 DEFAULT_MSG NGHTTP2_INCLUDE_DIR NGHTTP2_LIBRARY ) + +if( NGHTTP2_FOUND ) + set( NGHTTP2_INCLUDE_DIRS ${NGHTTP2_INCLUDE_DIR} ) + set( NGHTTP2_LIBRARIES ${NGHTTP2_LIBRARY} ) + if (WIN32) + set ( NGHTTP2_DLL_DIR "${NGHTTP2_HINTS}/bin" + CACHE PATH "Path to nghttp2 DLL" + ) + file( GLOB _nghttp2_dll RELATIVE "${NGHTTP2_DLL_DIR}" + "${NGHTTP2_DLL_DIR}/libnghttp2-*.dll" + ) + set ( NGHTTP2_DLL ${_nghttp2_dll} + # We're storing filenames only. Should we use STRING instead? + CACHE FILEPATH "nghttp2 DLL file name" + ) + mark_as_advanced( NGHTTP2_DLL_DIR NGHTTP2_DLL ) + endif() +else() + set( NGHTTP2_INCLUDE_DIRS ) + set( NGHTTP2_LIBRARIES ) +endif() + +mark_as_advanced( NGHTTP2_LIBRARIES NGHTTP2_INCLUDE_DIRS ) |