Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: BUILD.gn

Issue 826613004: Use system FreeType (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: update GN files Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/include/fxge/fx_freetype.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: BUILD.gn
diff --git a/BUILD.gn b/BUILD.gn
index a6ea1022947c9ea8743ec164dd1666eca6b7d278..2cba023a2e977e48a318acd120f442fbf74b638e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -6,13 +6,15 @@ import("//testing/test.gni")
pdf_use_skia = false
+declare_args() {
+ # On Android there's no system FreeType. On Windows and Mac, only a few
+ # methods are used from it.
+ bundle_freetype = !is_linux
+}
+
config("pdfium_config") {
cflags = []
- include_dirs = [
- "third_party/freetype/include"
- ]
defines = [
- "FT2_BUILD_LIBRARY",
"_FPDFSDK_LIB",
"_NO_GDIPLUS_", # workaround text rendering issues on Windows
"OPJ_STATIC",
@@ -40,6 +42,13 @@ config("pdfium_config") {
"/wd4345",
]
}
+
+ if (bundle_freetype) {
+ include_dirs = [ "third_party/freetype/include" ]
+ defines += [ "FT2_BUILD_LIBRARY" ]
+ } else {
+ include_dirs = [ "/usr/include/freetype2" ]
+ }
}
static_library("pdfium") {
@@ -92,7 +101,6 @@ static_library("pdfium") {
deps = [
"third_party:bigint",
- "third_party:freetype",
"third_party:safemath",
":fdrm",
":formfiller",
@@ -115,6 +123,12 @@ static_library("pdfium") {
if (is_mac) {
libs += [ "AppKit.framework", "CoreFoundation.framework" ]
}
+
+ if (bundle_freetype) {
+ deps += [ "third_party:freetype" ]
+ } else {
+ libs += [ "freetype" ]
+ }
}
# Targets below this are only visible within this file.
« no previous file with comments | « no previous file | core/include/fxge/fx_freetype.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698