3 # Copyright (C) 2019-2023 by
4 # David Turner, Robert Wilhelm, and Werner Lemberg.
6 # Written by Werner Lemberg <wl@gnu.org>
8 # This file is part of the FreeType project, and may only be used, modified,
9 # and distributed under the terms of the FreeType project license,
10 # LICENSE.TXT. By continuing to use, modify, or distribute this file you
11 # indicate that you have read the license and understand and accept it
15 # Try to find libbrotlidec include and library directories.
17 # If found, the following variables are set.
19 # BROTLIDEC_INCLUDE_DIRS
22 find_package(PkgConfig QUIET)
24 pkg_check_modules(PC_BROTLIDEC QUIET libbrotlidec)
26 if (PC_BROTLIDEC_VERSION)
27 set(BROTLIDEC_VERSION "${PC_BROTLIDEC_VERSION}")
31 find_path(BROTLIDEC_INCLUDE_DIRS
33 HINTS ${PC_BROTLIDEC_INCLUDEDIR}
34 ${PC_BROTLIDEC_INCLUDE_DIRS}
37 find_library(BROTLIDEC_LIBRARIES
39 HINTS ${PC_BROTLIDEC_LIBDIR}
40 ${PC_BROTLIDEC_LIBRARY_DIRS})
43 include(FindPackageHandleStandardArgs)
44 find_package_handle_standard_args(
46 REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES
47 FOUND_VAR BROTLIDEC_FOUND
48 VERSION_VAR BROTLIDEC_VERSION)
51 BROTLIDEC_INCLUDE_DIRS