BUILD.original 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. # Rules are adapted from CMakeLists.txt.
  5. package(
  6. default_visibility = ["//visibility:public"],
  7. )
  8. # Common part used by decoder and encoder
  9. cc_library(
  10. name = "woff2common",
  11. srcs = [
  12. "src/table_tags.cc",
  13. "src/variable_length.cc",
  14. "src/woff2_common.cc",
  15. ],
  16. hdrs = [
  17. "src/buffer.h",
  18. "src/file.h",
  19. "src/port.h",
  20. "src/round.h",
  21. "src/store_bytes.h",
  22. "src/table_tags.h",
  23. "src/variable_length.h",
  24. "src/woff2_common.h",
  25. ],
  26. strip_include_prefix = "src/",
  27. )
  28. # WOFF2 Decoder
  29. cc_library(
  30. name = "woff2dec",
  31. srcs = [
  32. "src/woff2_dec.cc",
  33. "src/woff2_out.cc",
  34. ],
  35. hdrs = [
  36. "include/woff2/decode.h",
  37. "include/woff2/output.h",
  38. ],
  39. copts = [
  40. "-Wno-unused-variable",
  41. "-Wno-unused-const-variable",
  42. ],
  43. strip_include_prefix = "include/",
  44. deps = [
  45. ":woff2common",
  46. "@brotli//:brotlidec",
  47. ],
  48. )
  49. cc_binary(
  50. name = "woff2_decompress",
  51. srcs = ["src/woff2_decompress.cc"],
  52. deps = [":woff2dec"],
  53. )
  54. # WOFF2 Encoder
  55. cc_library(
  56. name = "woff2enc",
  57. srcs = [
  58. "src/font.cc",
  59. "src/font.h",
  60. "src/glyph.cc",
  61. "src/glyph.h",
  62. "src/normalize.cc",
  63. "src/normalize.h",
  64. "src/transform.cc",
  65. "src/transform.h",
  66. "src/woff2_enc.cc",
  67. ],
  68. hdrs = [
  69. "include/woff2/encode.h",
  70. ],
  71. copts = [
  72. "-Wno-unused-variable",
  73. "-Wno-unused-const-variable",
  74. "-Wno-sign-compare",
  75. ],
  76. strip_include_prefix = "include/",
  77. deps = [
  78. ":woff2common",
  79. "@brotli//:brotlienc",
  80. ],
  81. )
  82. cc_binary(
  83. name = "woff2_compress",
  84. srcs = ["src/woff2_compress.cc"],
  85. deps = [":woff2enc"],
  86. )
  87. # WOFF2 info
  88. cc_binary(
  89. name = "woff2_info",
  90. srcs = [
  91. "src/font.h",
  92. "src/woff2_info.cc",
  93. ],
  94. copts = ["-Wno-sign-compare"],
  95. deps = [":woff2common"],
  96. )