[M120 Migration] Implement ewk_view_is_video_playing api
[platform/framework/web/chromium-efl.git] / third_party / BUILD.gn
1 # Copyright 2014 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//build/buildflag_header.gni")
6 import("//build/config/features.gni")
7 import("//build/config/freetype/freetype.gni")
8 import("//third_party/harfbuzz-ng/harfbuzz.gni")
9 import("//third_party/libjpeg.gni")
10
11 assert(
12     use_blink,
13     "This is not used on if blink is not enabled, don't drag it in unintentionally")
14
15 config("system_libjpeg_config") {
16   libs = [ "jpeg" ]
17   defines = [ "USE_SYSTEM_LIBJPEG" ]
18 }
19
20 config("libjpeg_turbo_config") {
21   defines = [ "USE_LIBJPEG_TURBO=1" ]
22 }
23
24 # This is a meta target that forwards to the system's libjpeg,
25 # third_party/libjpeg, or third_party/libjpeg_turbo depending on the build args
26 # declared in this file.
27 group("jpeg") {
28   if (use_system_libjpeg) {
29     public_configs = [ ":system_libjpeg_config" ]
30   } else if (use_libjpeg_turbo) {
31     public_deps = [ "//third_party/libjpeg_turbo:libjpeg" ]
32     public_configs = [ ":libjpeg_turbo_config" ]
33   } else {
34     public_deps = [ "//third_party/libjpeg:libjpeg" ]
35   }
36 }
37
38 # This is a meta target that forwards include paths only to the system's
39 # libjpeg, third_party/libjpeg, or third_party/libjpeg_turbo depending on the
40 # build args declared in this file. This is needed, rarely, for targets that
41 # need to reference libjpeg without explicitly building it.
42 group("jpeg_includes") {
43   if (use_system_libjpeg) {
44     public_configs = [ ":system_libjpeg_config" ]
45   } else if (use_libjpeg_turbo) {
46     public_configs = [ "//third_party/libjpeg_turbo:libjpeg_config" ]
47   } else {
48     public_configs = [ "//third_party/libjpeg:libjpeg_config" ]
49   }
50 }
51
52 # FreeType and HarfBuzz libraries are dependent on each other. This component
53 # will depend on the appropriate source sets or export the system packages
54 # for both FreeType and HarfBuzz.
55 component("freetype_harfbuzz") {
56   public_configs = []
57   public_deps = []
58   if (use_system_freetype) {
59     public_configs += [ "//build/linux:freetype_from_pkgconfig" ]
60   } else {
61     public_deps += [ "//third_party/freetype:freetype_source" ]
62   }
63   if (use_system_harfbuzz) {
64     public_configs += [ "//third_party/harfbuzz-ng:harfbuzz_from_pkgconfig" ]
65   } else {
66     public_deps += [ "//third_party/harfbuzz-ng:harfbuzz_source" ]
67   }
68 }
69
70 buildflag_header("freetype_buildflags") {
71   header = "freetype_buildflags.h"
72   flags = [ "USE_SYSTEM_FREETYPE=$use_system_freetype" ]
73 }