Fix GN PDFium build when building all.
authorJohn Abd-El-Malek <jam@chromium.org>
Mon, 2 Feb 2015 00:19:29 +0000 (16:19 -0800)
committerJohn Abd-El-Malek <jam@chromium.org>
Mon, 2 Feb 2015 00:19:29 +0000 (16:19 -0800)
The problem was FT_INTERNAL_DEBUG_H wasn't being defined because FT2_BUILD_LIBRARY wasn't set. So even if PDFium isn't using bundled FreeType, the FreeType target needs FT2_BUILD_LIBRARY defined. The GYP build was already correct.

BUG=453844
TBR=brettw

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

BUILD.gn
pdfium.gyp
third_party/BUILD.gn

index b52913b..988ca7e 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -43,10 +43,6 @@ config("pdfium_config") {
       "/wd4345",
     ]
   }
-
-  if (bundle_freetype) {
-    defines += [ "FT2_BUILD_LIBRARY" ]
-  }
 }
 
 static_library("pdfium") {
index 2b21e9d..7b6ac0c 100644 (file)
       ['pdf_use_skia==1', {
         'defines': ['_SKIA_SUPPORT_'],
       }],
-      ['bundle_freetype==1', {
-        'defines' : [
-          'FT2_BUILD_LIBRARY',
-        ],
-      }],
       ['OS=="linux"', {
         'conditions': [
           ['target_arch=="x64"', {
index e6340c6..df02938 100644 (file)
@@ -36,6 +36,7 @@ static_library("freetype") {
       "//third_party/pdfium:pdfium_config",
       "//build/config/compiler:no_chromium_code",
   ]
+  defines = [ "FT2_BUILD_LIBRARY" ]
   sources = [
     "freetype/include/freetype.h",
     "freetype/include/ft2build.h",