BUILD.gn 909 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Copyright 2017 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/config/ui.gni")
  5. component("codec") {
  6. sources = [
  7. "codec_export.h",
  8. "jpeg_codec.cc",
  9. "jpeg_codec.h",
  10. "png_codec.cc",
  11. "png_codec.h",
  12. "vector_wstream.cc",
  13. "vector_wstream.h",
  14. "webp_codec.cc",
  15. "webp_codec.h",
  16. ]
  17. deps = [
  18. "//base",
  19. "//skia",
  20. "//third_party/libpng",
  21. "//ui/gfx:gfx_export",
  22. "//ui/gfx:gfx_skia",
  23. "//ui/gfx/geometry",
  24. ]
  25. if (is_ios) {
  26. sources -= [
  27. "jpeg_codec.cc",
  28. "jpeg_codec.h",
  29. ]
  30. } else {
  31. deps += [ "//third_party:jpeg" ]
  32. }
  33. if (is_win) {
  34. cflags = [ "/wd4324" ] # Structure was padded due to __declspec(align()),
  35. # which is uninteresting.
  36. }
  37. defines = [ "CODEC_IMPLEMENTATION" ]
  38. }