From 8842c6214cf70fa4237d17684cc9f609536c0240 Mon Sep 17 00:00:00 2001 From: Brett Wilson Date: Fri, 6 Mar 2015 11:06:38 -0800 Subject: Fix the pdfium component build. It has a component with no object files in it. When compiled as a shared library, this fails. This changes the target to a source set which can handle empty sources. It also changes the other static libraries in pdfium to source_sets (it should be very rare to need real static libraries). Runs "gn format" over the BUILD files. Renames the arg bundle_freetype to pdfium_bundle_freetype which makes more sense in the context of a larger build like Chrome. R=jam@chromium.org Review URL: https://codereview.chromium.org/985543002 --- third_party/BUILD.gn | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'third_party/BUILD.gn') diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn index fcb09c4b47..c6de4535da 100644 --- a/third_party/BUILD.gn +++ b/third_party/BUILD.gn @@ -10,31 +10,31 @@ group("third_party") { ] } -static_library("bigint") { +source_set("bigint") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ - "//third_party/pdfium:pdfium_config", - "//build/config/compiler:no_chromium_code", + "//third_party/pdfium:pdfium_config", + "//build/config/compiler:no_chromium_code", ] sources = [ + "bigint/BigInteger.cc", "bigint/BigInteger.hh", "bigint/BigIntegerLibrary.hh", - "bigint/BigIntegerUtils.hh", - "bigint/BigUnsigned.hh", - "bigint/NumberlikeArray.hh", - "bigint/BigUnsignedInABase.hh", - "bigint/BigInteger.cc", "bigint/BigIntegerUtils.cc", + "bigint/BigIntegerUtils.hh", "bigint/BigUnsigned.cc", + "bigint/BigUnsigned.hh", "bigint/BigUnsignedInABase.cc", + "bigint/BigUnsignedInABase.hh", + "bigint/NumberlikeArray.hh", ] } -static_library("freetype") { +source_set("freetype") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ - "//third_party/pdfium:pdfium_config", - "//build/config/compiler:no_chromium_code", + "//third_party/pdfium:pdfium_config", + "//build/config/compiler:no_chromium_code", ] defines = [ "FT2_BUILD_LIBRARY" ] sources = [ @@ -43,13 +43,10 @@ static_library("freetype") { "freetype/include/ftmm.h", "freetype/include/ftotval.h", "freetype/include/ftoutln.h", - "freetype/include/tttables.h", "freetype/include/internal/ftobjs.h", "freetype/include/internal/ftstream.h", "freetype/include/internal/tttypes.h", - "freetype/src/cff/cffobjs.h", - "freetype/src/cff/cfftypes.h", - "freetype/src/cff/cff.c", + "freetype/include/tttables.h", "freetype/src/base/ftbase.c", "freetype/src/base/ftbitmap.c", "freetype/src/base/ftglyph.c", @@ -57,6 +54,10 @@ static_library("freetype") { "freetype/src/base/ftlcdfil.c", "freetype/src/base/ftmm.c", "freetype/src/base/ftsystem.c", + "freetype/src/cff/cff.c", + "freetype/src/cff/cffobjs.h", + "freetype/src/cff/cfftypes.h", + "freetype/src/cid/type1cid.c", "freetype/src/psaux/psaux.c", "freetype/src/pshinter/pshinter.c", "freetype/src/psnames/psmodule.c", @@ -65,24 +66,22 @@ static_library("freetype") { "freetype/src/smooth/smooth.c", "freetype/src/truetype/truetype.c", "freetype/src/type1/type1.c", - "freetype/src/cid/type1cid.c", ] } -component("pdfium_base") { +source_set("pdfium_base") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ - "//third_party/pdfium:pdfium_config", - "//build/config/compiler:no_chromium_code", + "//third_party/pdfium:pdfium_config", + "//build/config/compiler:no_chromium_code", ] sources = [ "base/logging.h", "base/macros.h", - "base/template_util.h", "base/numerics/safe_conversions.h", "base/numerics/safe_conversions_impl.h", "base/numerics/safe_math.h", "base/numerics/safe_math_impl.h", + "base/template_util.h", ] } - -- cgit v1.2.3