summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-13 02:23:34 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-13 02:23:34 +0000
commitcceca60d2b1c86afea4b1b107c4b6ed6847c3869 (patch)
treee30ec997afa0e4666fd61b6ab35fcf3e33295066
parent8f120ac4ffbcfae1ce35861b14c0e5fa03e5bd74 (diff)
downloadchromium_src-cceca60d2b1c86afea4b1b107c4b6ed6847c3869.zip
chromium_src-cceca60d2b1c86afea4b1b107c4b6ed6847c3869.tar.gz
chromium_src-cceca60d2b1c86afea4b1b107c4b6ed6847c3869.tar.bz2
Convert some third_party deps to GN
These are required by Blink platform which I'm working on now. Also adds a missing enum to the GN target name description function. BUG= Review URL: https://codereview.chromium.org/276263003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269971 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--BUILD.gn4
-rw-r--r--third_party/brotli/BUILD.gn28
-rw-r--r--third_party/iccjpeg/BUILD.gn17
-rw-r--r--third_party/qcms/BUILD.gn44
-rw-r--r--tools/gn/secondary/third_party/ots/BUILD.gn90
-rw-r--r--tools/gn/target.cc2
6 files changed, 185 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn
index beadcbc..38648cd 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -38,11 +38,15 @@ group("root") {
#"//sdch",
"//skia",
#"//third_party/WebKit/Source/platform",
+ "//third_party/brotli",
+ "//third_party/iccjpeg",
"//third_party/icu",
"//third_party/leveldatabase",
"//third_party/libpng",
"//third_party/libusb",
"//third_party/libwebp",
+ "//third_party/ots",
+ "//third_party/qcms",
"//third_party/re2",
"//third_party/smhasher:cityhash",
"//third_party/smhasher:murmurhash3",
diff --git a/third_party/brotli/BUILD.gn b/third_party/brotli/BUILD.gn
new file mode 100644
index 0000000..5696b1d
--- /dev/null
+++ b/third_party/brotli/BUILD.gn
@@ -0,0 +1,28 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+source_set("brotli") {
+ sources = [
+ "src/brotli/dec/bit_reader.c",
+ "src/brotli/dec/bit_reader.h",
+ "src/brotli/dec/context.h",
+ "src/brotli/dec/decode.c",
+ "src/brotli/dec/decode.h",
+ "src/brotli/dec/dictionary.h",
+ "src/brotli/dec/huffman.c",
+ "src/brotli/dec/huffman.h",
+ "src/brotli/dec/prefix.h",
+ "src/brotli/dec/safe_malloc.c",
+ "src/brotli/dec/safe_malloc.h",
+ "src/brotli/dec/streams.c",
+ "src/brotli/dec/streams.h",
+ "src/brotli/dec/transform.h",
+ "src/brotli/dec/types.h",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ include_dirs = [ "src/brotli/dec" ]
+}
diff --git a/third_party/iccjpeg/BUILD.gn b/third_party/iccjpeg/BUILD.gn
new file mode 100644
index 0000000..eec5fe8
--- /dev/null
+++ b/third_party/iccjpeg/BUILD.gn
@@ -0,0 +1,17 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+config("iccjpeg_config") {
+ include_dirs = [ "." ]
+}
+
+source_set("iccjpeg") {
+ sources = [
+ "iccjpeg.c",
+ "iccjpeg.h"
+ ]
+
+ direct_dependent_configs = [ ":iccjpeg_config" ]
+ deps = [ "//third_party:jpeg" ]
+}
diff --git a/third_party/qcms/BUILD.gn b/third_party/qcms/BUILD.gn
new file mode 100644
index 0000000..d0802f0
--- /dev/null
+++ b/third_party/qcms/BUILD.gn
@@ -0,0 +1,44 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+config("qcms_config") {
+ include_dirs = [ "src" ]
+}
+
+source_set("qcms") {
+ sources = [
+ "src/chain.c",
+ "src/chain.h",
+ "src/iccread.c",
+ "src/matrix.c",
+ "src/matrix.h",
+ "src/qcms.h",
+ "src/qcmsint.h",
+ "src/qcmstypes.h",
+ "src/transform.c",
+ "src/transform_util.c",
+ "src/transform_util.h",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ direct_dependent_configs = [ ":qcms_config" ]
+
+ if (cpu_arch == "x86" || cpu_arch == "x64") {
+ defines = [ "SSE2_ENABLE" ]
+ sources += [ "src/transform-sse2.c" ]
+ if (!(is_win && cpu_arch == "x64")) {
+ # QCMS assumes this target isn't compiled since MSVC x64 doesn't support
+ # the MMX intrinsics present in the SSE1 code.
+ sources += [ "src/transform-sse1.c" ]
+ }
+ }
+
+ if (is_win) {
+ cflags = [
+ "/wd4056", # Overflow in floating-point constant arithmetic (INFINITY).
+ "/wd4756", # Overflow in constant arithmetic (INFINITY).
+ ]
+ }
+}
diff --git a/tools/gn/secondary/third_party/ots/BUILD.gn b/tools/gn/secondary/third_party/ots/BUILD.gn
new file mode 100644
index 0000000..513dce6
--- /dev/null
+++ b/tools/gn/secondary/third_party/ots/BUILD.gn
@@ -0,0 +1,90 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+config("ots_config") {
+ include_dirs = [ "include" ]
+}
+
+source_set("ots") {
+ sources = [
+ "include/ots-memory-stream.h",
+ "include/opentype-sanitiser.h",
+ "src/cff.cc",
+ "src/cff.h",
+ "src/cff_type2_charstring.cc",
+ "src/cff_type2_charstring.h",
+ "src/cmap.cc",
+ "src/cmap.h",
+ "src/cvt.cc",
+ "src/cvt.h",
+ "src/fpgm.cc",
+ "src/fpgm.h",
+ "src/gasp.cc",
+ "src/gasp.h",
+ "src/gdef.cc",
+ "src/gdef.h",
+ "src/glyf.cc",
+ "src/glyf.h",
+ "src/gpos.cc",
+ "src/gpos.h",
+ "src/gsub.cc",
+ "src/gsub.h",
+ "src/hdmx.cc",
+ "src/hdmx.h",
+ "src/head.cc",
+ "src/head.h",
+ "src/hhea.cc",
+ "src/hhea.h",
+ "src/hmtx.cc",
+ "src/hmtx.h",
+ "src/kern.cc",
+ "src/kern.h",
+ "src/layout.cc",
+ "src/layout.h",
+ "src/loca.cc",
+ "src/loca.h",
+ "src/ltsh.cc",
+ "src/ltsh.h",
+ "src/maxp.cc",
+ "src/maxp.h",
+ "src/math.cc",
+ "src/math_.h",
+ "src/metrics.cc",
+ "src/metrics.h",
+ "src/name.cc",
+ "src/name.h",
+ "src/os2.cc",
+ "src/os2.h",
+ "src/ots.cc",
+ "src/ots.h",
+ "src/post.cc",
+ "src/post.h",
+ "src/prep.cc",
+ "src/prep.h",
+ "src/vdmx.cc",
+ "src/vdmx.h",
+ "src/vhea.cc",
+ "src/vhea.h",
+ "src/vmtx.cc",
+ "src/vmtx.h",
+ "src/vorg.cc",
+ "src/vorg.h",
+ "src/woff2.cc",
+ "src/woff2.h",
+ ]
+
+ direct_dependent_configs = [ ":ots_config" ]
+
+ deps = [
+ "//third_party/brotli",
+ "//third_party/zlib",
+ ]
+
+ if (is_win) {
+ cflags = [
+ "/wd4267", # Conversion from size_t to 'type'.
+ "/wd4334", # 32-bit shift implicitly converted to 64-bits.
+ ]
+ }
+}
diff --git a/tools/gn/target.cc b/tools/gn/target.cc
index b6845d0..d1c0c4a 100644
--- a/tools/gn/target.cc
+++ b/tools/gn/target.cc
@@ -74,6 +74,8 @@ const char* Target::GetStringForOutputType(OutputType type) {
return "Shared library";
case STATIC_LIBRARY:
return "Static library";
+ case SOURCE_SET:
+ return "Source set";
case COPY_FILES:
return "Copy";
case ACTION: