1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36

build / linux / unbundle / brotli.gn [blame]

import("//build/config/linux/pkg_config.gni")
import("//build/shim_headers.gni")

pkg_config("system_brotli_dec") {
  packages = [ "libbrotlidec" ]
}

pkg_config("system_brotli_enc") {
  packages = [ "libbrotlienc" ]
}

shim_headers("brotli_shim") {
  root_path = "include"
  headers = [
    "brotli/decode.h",
    "brotli/encode.h",
    "brotli/port.h",
    "brotli/shared_dictionary.h",
    "brotli/types.h",
  ]
}

source_set("dec") {
  deps = [ ":brotli_shim" ]
  public_configs = [ ":system_brotli_dec" ]
}

source_set("enc") {
  deps = [ ":brotli_shim" ]
  public_configs = [ ":system_brotli_enc" ]
}

copy("brotli") {
  sources = [ "/usr/bin/brotli" ]
  outputs = [ "$root_out_dir/brotli" ]
}