diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:52:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:52:01 +0000 |
commit | 42f47327da6a208ac3cd1f9bca07fc506ed51a63 (patch) | |
tree | e06c5e993e0d0b618f616280b372506b1f0f8419 /cmake/FindLibbrotlienc.cmake | |
parent | Adding debian version 1.59.0-1. (diff) | |
download | nghttp2-42f47327da6a208ac3cd1f9bca07fc506ed51a63.tar.xz nghttp2-42f47327da6a208ac3cd1f9bca07fc506ed51a63.zip |
Merging upstream version 1.60.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | cmake/FindLibbrotlienc.cmake | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/cmake/FindLibbrotlienc.cmake b/cmake/FindLibbrotlienc.cmake new file mode 100644 index 0000000..acf6334 --- /dev/null +++ b/cmake/FindLibbrotlienc.cmake @@ -0,0 +1,36 @@ +# - Try to find libbrotlienc +# Once done this will define +# LIBBROTLIENC_FOUND - System has libbrotlienc +# LIBBROTLIENC_INCLUDE_DIRS - The libbrotlienc include directories +# LIBBROTLIENC_LIBRARIES - The libraries needed to use libbrotlienc + +find_package(PkgConfig QUIET) +pkg_check_modules(PC_LIBBROTLIENC QUIET libbrotlienc) + +find_path(LIBBROTLIENC_INCLUDE_DIR + NAMES brotli/encode.h + HINTS ${PC_LIBBROTLIENC_INCLUDE_DIRS} +) +find_library(LIBBROTLIENC_LIBRARY + NAMES brotlienc + HINTS ${PC_LIBBROTLIENC_LIBRARY_DIRS} +) + +if(PC_LIBBROTLIENC_FOUND) + set(LIBBROTLIENC_VERSION ${PC_LIBBROTLIENC_VERSION}) +endif() + +include(FindPackageHandleStandardArgs) +# handle the QUIETLY and REQUIRED arguments and set LIBBROTLIENC_FOUND +# to TRUE if all listed variables are TRUE and the requested version +# matches. +find_package_handle_standard_args(Libbrotlienc REQUIRED_VARS + LIBBROTLIENC_LIBRARY LIBBROTLIENC_INCLUDE_DIR + VERSION_VAR LIBBROTLIENC_VERSION) + +if(LIBBROTLIENC_FOUND) + set(LIBBROTLIENC_LIBRARIES ${LIBBROTLIENC_LIBRARY}) + set(LIBBROTLIENC_INCLUDE_DIRS ${LIBBROTLIENC_INCLUDE_DIR}) +endif() + +mark_as_advanced(LIBBROTLIENC_INCLUDE_DIR LIBBROTLIENC_LIBRARY) |