ed27db0b91
This brings various improvements to the current Makefile and intends to help people to package WOFF2: * Build and install static and shared libraries for encoder and decoder * Install public headers * Generate and install pc files for PkgConfig * Build the woff2_* programs * Build the fuzzer archives * Specify a release version (0.0.1 is hardcoded for now) * Build using a Brotli version installed on the system, instead of the git submodule * Have some CANONICAL_PREFIXES and NOISY_LOGGING configuration options
36 lines
921 B
CMake
36 lines
921 B
CMake
# Copyright 2017 Igalia S.L. All Rights Reserved.
|
|
#
|
|
# Distributed under MIT license.
|
|
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
|
|
|
# Try to find BrotliEnc. Once done, this will define
|
|
#
|
|
# BROTLIENC_FOUND - system has BrotliEnc.
|
|
# BROTLIENC_INCLUDE_DIRS - the BrotliEnc include directories
|
|
# BROTLIENC_LIBRARIES - link these to use BrotliEnc.
|
|
|
|
find_package(PkgConfig)
|
|
|
|
pkg_check_modules(PC_BROTLIENC libbrotlienc)
|
|
|
|
find_path(BROTLIENC_INCLUDE_DIRS
|
|
NAMES brotli/encode.h
|
|
HINTS ${PC_BROTLIENC_INCLUDEDIR}
|
|
)
|
|
|
|
find_library(BROTLIENC_LIBRARIES
|
|
NAMES brotlienc
|
|
HINTS ${PC_BROTLIENC_LIBDIR}
|
|
)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(BrotliEnc
|
|
REQUIRED_VARS BROTLIENC_INCLUDE_DIRS BROTLIENC_LIBRARIES
|
|
FOUND_VAR BROTLIENC_FOUND
|
|
VERSION_VAR PC_BROTLIENC_VERSION)
|
|
|
|
mark_as_advanced(
|
|
BROTLIENC_INCLUDE_DIRS
|
|
BROTLIENC_LIBRARIES
|
|
)
|