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", |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 sources += [ "src/src/base/ftbdf.c" ] | 80 sources += [ "src/src/base/ftbdf.c" ] |
81 } | 81 } |
82 | 82 |
83 if (is_linux || is_chromecast) { | 83 if (is_linux || is_chromecast) { |
84 # Needed on Fedora whose libfreetype builds ftsynth.c containing | 84 # Needed on Fedora whose libfreetype builds ftsynth.c containing |
85 # FT_GlyphSlot_Embolden, which we need to replace in content_shell if | 85 # FT_GlyphSlot_Embolden, which we need to replace in content_shell if |
86 # we are linking against our own FreeType. | 86 # we are linking against our own FreeType. |
87 sources += [ "src/src/base/ftsynth.c" ] | 87 sources += [ "src/src/base/ftsynth.c" ] |
88 } | 88 } |
89 | 89 |
| 90 if (is_mac && !is_component_build) { |
| 91 defines += [ "MAC_RESTRICT_VISIBILITY" ] |
| 92 } |
| 93 |
90 defines += [ | 94 defines += [ |
91 "FT2_BUILD_LIBRARY", | 95 "FT2_BUILD_LIBRARY", |
92 "DARWIN_NO_CARBON", | 96 "DARWIN_NO_CARBON", |
93 | 97 |
94 # Long directory name to avoid accidentally using wrong headers. | 98 # Long directory name to avoid accidentally using wrong headers. |
95 # GN currently does not escape '<' and '>' when generating xml based Visual | 99 # GN currently does not escape '<' and '>' when generating xml based Visual |
96 # Studio project files. As a result, use quotes instead of pointy brackets | 100 # Studio project files. As a result, use quotes instead of pointy brackets |
97 # in these defines. | 101 # in these defines. |
98 "FT_CONFIG_MODULES_H=\"freetype-custom-config/ftmodule.h\"", | 102 "FT_CONFIG_MODULES_H=\"freetype-custom-config/ftmodule.h\"", |
99 "FT_CONFIG_OPTIONS_H=\"freetype-custom-config/ftoption.h\"", | 103 "FT_CONFIG_OPTIONS_H=\"freetype-custom-config/ftoption.h\"", |
100 ] | 104 ] |
101 | 105 |
102 if (is_win && is_component_build) { | 106 if (is_win && is_component_build) { |
103 # Used for managing declspec(dllimport/export) visibility. | 107 # Used for managing declspec(dllimport/export) visibility. |
104 defines += [ "FT2_BUILD_DLL" ] | 108 defines += [ "FT2_BUILD_DLL" ] |
105 } | 109 } |
106 | 110 |
107 public_configs = [ ":freetype_config" ] | 111 public_configs = [ ":freetype_config" ] |
108 configs -= [ "//build/config/compiler:chromium_code" ] | 112 configs -= [ "//build/config/compiler:chromium_code" ] |
109 configs += [ "//build/config/compiler:no_chromium_code" ] | 113 configs += [ "//build/config/compiler:no_chromium_code" ] |
110 | 114 |
111 configs += [ ":freetype-warnings" ] | 115 configs += [ ":freetype-warnings" ] |
112 | 116 |
113 deps = [ | 117 deps = [ |
114 "//third_party/libpng", | 118 "//third_party/libpng", |
115 "//third_party/zlib", | 119 "//third_party/zlib", |
116 ] | 120 ] |
117 } | 121 } |
OLD | NEW |