| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/chromecast_build.gni") | 5 import("//build/config/chromecast_build.gni") |
| 6 | 6 |
| 7 config("freetype_config") { | 7 config("freetype_config") { |
| 8 include_dirs = [ | 8 include_dirs = [ |
| 9 "include", | 9 "include", |
| 10 "src/include", | 10 "src/include", |
| 11 ] | 11 ] |
| 12 } | 12 } |
| 13 | 13 |
| 14 config("freetype-warnings") { | 14 config("freetype-warnings") { |
| 15 cflags = [] | 15 cflags = [] |
| 16 | 16 |
| 17 # The reduction of FreeType files to a minimum triggers -Wunused-function | 17 if (is_clang) { |
| 18 # warnings in ftbase.c | 18 # The reduction of FreeType files to a minimum triggers -Wunused-function |
| 19 cflags += [ "-Wno-unused-function" ] | 19 # warnings in ftbase.c |
| 20 } | 20 cflags += [ "-Wno-unused-function" ] |
| 21 | 21 } |
| 22 config("freetype-visibility") { | |
| 23 cflags = [] | |
| 24 cflags += [ "-fvisibility=default" ] | |
| 25 } | 22 } |
| 26 | 23 |
| 27 component("freetype") { | 24 component("freetype") { |
| 28 if (is_linux) { | 25 if (is_linux) { |
| 29 output_name = "freetype" | 26 output_name = "freetype" |
| 30 output_extension = "so.6" | 27 output_extension = "so.6" |
| 31 } | 28 } |
| 32 | 29 |
| 33 sources = [ | 30 sources = [ |
| 34 "src/src/autofit/autofit.c", | 31 "src/src/autofit/autofit.c", |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 67 |
| 71 defines = [ | 68 defines = [ |
| 72 "FT2_BUILD_LIBRARY", | 69 "FT2_BUILD_LIBRARY", |
| 73 "DARWIN_NO_CARBON", | 70 "DARWIN_NO_CARBON", |
| 74 | 71 |
| 75 # Long directory name to avoid accidentally using wrong headers. | 72 # Long directory name to avoid accidentally using wrong headers. |
| 76 "FT_CONFIG_MODULES_H=<freetype-custom-config/ftmodule.h>", | 73 "FT_CONFIG_MODULES_H=<freetype-custom-config/ftmodule.h>", |
| 77 "FT_CONFIG_OPTIONS_H=<freetype-custom-config/ftoption.h>", | 74 "FT_CONFIG_OPTIONS_H=<freetype-custom-config/ftoption.h>", |
| 78 ] | 75 ] |
| 79 | 76 |
| 77 if (is_win && is_component_build) { |
| 78 # Used for managing declspec(dllimport/export) visibility. |
| 79 defines += [ "FT2_BUILD_DLL" ] |
| 80 } |
| 81 |
| 80 public_configs = [ ":freetype_config" ] | 82 public_configs = [ ":freetype_config" ] |
| 81 configs -= [ "//build/config/compiler:chromium_code" ] | 83 configs -= [ "//build/config/compiler:chromium_code" ] |
| 82 configs += [ | 84 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 83 "//build/config/compiler:no_chromium_code", | 85 |
| 84 ":freetype-warnings", | 86 configs += [ ":freetype-warnings" ] |
| 85 ":freetype-visibility", | |
| 86 ] | |
| 87 | 87 |
| 88 deps = [ | 88 deps = [ |
| 89 "//third_party/libpng", | 89 "//third_party/libpng", |
| 90 "//third_party/zlib", | 90 "//third_party/zlib", |
| 91 ] | 91 ] |
| 92 } | 92 } |
| OLD | NEW |