Index: third_party/libexif/BUILD.gn |
diff --git a/third_party/libexif/BUILD.gn b/third_party/libexif/BUILD.gn |
new file mode 100644 |
index 0000000000000000000000000000000000000000..98d11f6586f18408b5dfb8582d7967083ef896f6 |
--- /dev/null |
+++ b/third_party/libexif/BUILD.gn |
@@ -0,0 +1,67 @@ |
+# Copyright 2015 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. |
+ |
+# Linux should use system libexif |
+if (!is_linux || is_chromeos) { |
+ |
+ # TODO(GYP) Add Linux support, if neccessary. |
Lei Zhang
2015/01/15 08:30:27
... that is, you can put my username here. I'll ta
Slava Chigrin
2015/01/15 08:42:48
Done.
|
+ config("libexif_config") { |
+ include_dirs = [ "sources" ] |
+ } |
+ |
+ static_library("libexif") { |
+ sources = [ |
+ "sources/libexif/exif-byte-order.c", |
+ "sources/libexif/exif-content.c", |
+ "sources/libexif/exif-data.c", |
+ "sources/libexif/exif-entry.c", |
+ "sources/libexif/exif-format.c", |
+ "sources/libexif/exif-ifd.c", |
+ "sources/libexif/exif-loader.c", |
+ "sources/libexif/exif-log.c", |
+ "sources/libexif/exif-mem.c", |
+ "sources/libexif/exif-mnote-data.c", |
+ "sources/libexif/exif-tag.c", |
+ "sources/libexif/exif-utils.c", |
+ "sources/libexif/canon/exif-mnote-data-canon.c", |
+ "sources/libexif/canon/mnote-canon-entry.c", |
+ "sources/libexif/canon/mnote-canon-tag.c", |
+ "sources/libexif/fuji/exif-mnote-data-fuji.c", |
+ "sources/libexif/fuji/mnote-fuji-entry.c", |
+ "sources/libexif/fuji/mnote-fuji-tag.c", |
+ "sources/libexif/olympus/exif-mnote-data-olympus.c", |
+ "sources/libexif/olympus/mnote-olympus-entry.c", |
+ "sources/libexif/olympus/mnote-olympus-tag.c", |
+ "sources/libexif/pentax/exif-mnote-data-pentax.c", |
+ "sources/libexif/pentax/mnote-pentax-entry.c", |
+ "sources/libexif/pentax/mnote-pentax-tag.c", |
+ ] |
+ |
+ include_dirs = [ "sources" ] |
+ |
+ #TODO(GYP): Additional options for non-Windows platforms. |
Lei Zhang
2015/01/15 08:30:26
nit: space after the '#', ditto below.
Slava Chigrin
2015/01/15 08:42:48
Done.
|
+ |
+ if (is_win) { |
+ defines = [ |
+ # This seems like a hack, but this is what WebKit Win does. |
+ "snprintf=_snprintf", |
+ "inline=__inline", |
+ ] |
+ |
+ ldflags = [ "/DEF:" + rebase_path("libexif.def") ] |
+ |
+ cflags = [ |
+ "/wd4018", # size/unsigned mismatch |
+ "/wd4267", # size_t -> ExifLong truncation on amd64 |
+ ] |
+ |
+ #TODO(GYP): Remove /analyze, when it will be used in GN. |
Lei Zhang
2015/01/15 08:24:11
Remove -> Add?
Slava Chigrin
2015/01/15 08:42:48
In GYP this switch in "AdditionalOptions!" (note e
Lei Zhang
2015/01/15 08:46:07
Right, sorry for the confusion. It's getting late
|
+ } |
+ |
+ configs -= [ "//build/config/compiler:chromium_code" ] |
+ configs += [ "//build/config/compiler:no_chromium_code" ] |
+ |
+ public_configs = [ ":libexif_config" ] |
+ } |
+} |