Always use the FreeType headers included in PDFium.
authorJohn Abd-El-Malek <jam@chromium.org>
Sun, 1 Feb 2015 19:22:25 +0000 (11:22 -0800)
committerJohn Abd-El-Malek <jam@chromium.org>
Sun, 1 Feb 2015 19:22:25 +0000 (11:22 -0800)
The problem with trying to use the system headers sometimes is that we'll need to use pkg-config which is pretty slow.

BUG=453844
TBR=brettw

Review URL: https://codereview.chromium.org/865333003

BUILD.gn
pdfium.gyp

index 9c58b03..b52913b 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -14,6 +14,7 @@ declare_args() {
 
 config("pdfium_config") {
   cflags = []
+  include_dirs = [ "third_party/freetype/include" ]
   defines = [
     "_FPDFSDK_LIB",
     "_NO_GDIPLUS_",  # workaround text rendering issues on Windows
@@ -44,10 +45,7 @@ config("pdfium_config") {
   }
 
   if (bundle_freetype) {
-    include_dirs = [ "third_party/freetype/include" ]
     defines += [ "FT2_BUILD_LIBRARY" ]
-  } else {
-    include_dirs = [ "/usr/include/freetype2" ]
   }
 }
 
index 8b13321..2b21e9d 100644 (file)
       '_NO_GDIPLUS_',  # workaround text rendering issues on Windows
       'OPJ_STATIC',
     ],
+    'include_dirs': [
+      'third_party/freetype/include',
+    ],
     'conditions': [
       ['pdf_use_skia==1', {
         'defines': ['_SKIA_SUPPORT_'],
       }],
       ['bundle_freetype==1', {
-        'include_dirs': [
-          'third_party/freetype/include',
-        ],
         'defines' : [
           'FT2_BUILD_LIBRARY',
         ],
-      }, {
-        'include_dirs' : [
-          '/usr/include/freetype2',
-        ],
       }],
       ['OS=="linux"', {
         'conditions': [