Add support for the CMake build system.

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
This commit is contained in:
Frédéric Wang
2017-10-04 12:16:22 +02:00
committed by Rod Sheeter
parent 3060d8b232
commit ed27db0b91
4 changed files with 372 additions and 0 deletions
+23
View File
@@ -25,6 +25,29 @@ cd woff2
make clean all
```
Alternatively, if Brotli is already installed on your system you can use CMake
to build executables and libraries:
```
git clone https://github.com/google/woff2.git
cd woff2
mkdir out
cd out
cmake ..
make
make install
```
By default, shared libraries are built. To use static linkage, do:
```
cd woff2
mkdir out-static
cmake -DBUILD_SHARED_LIBS=OFF ..
make
make install
```
## Run
Ensure the binaries from the build process are in your $PATH, then: