1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # Linux should use system libexif
6 if (!is_linux || is_chromeos) {
7 # TODO(thestig): Properly support building on Linux.
8 config("libexif_config") {
9 include_dirs = [ "sources" ]
12 "-Wno-enum-conversion",
16 # libexif uses fabs(int) to cast to float.
17 "-Wno-absolute-value",
22 static_library("libexif") {
24 "sources/libexif/canon/exif-mnote-data-canon.c",
25 "sources/libexif/canon/mnote-canon-entry.c",
26 "sources/libexif/canon/mnote-canon-tag.c",
27 "sources/libexif/exif-byte-order.c",
28 "sources/libexif/exif-content.c",
29 "sources/libexif/exif-data.c",
30 "sources/libexif/exif-entry.c",
31 "sources/libexif/exif-format.c",
32 "sources/libexif/exif-ifd.c",
33 "sources/libexif/exif-loader.c",
34 "sources/libexif/exif-log.c",
35 "sources/libexif/exif-mem.c",
36 "sources/libexif/exif-mnote-data.c",
37 "sources/libexif/exif-tag.c",
38 "sources/libexif/exif-utils.c",
39 "sources/libexif/fuji/exif-mnote-data-fuji.c",
40 "sources/libexif/fuji/mnote-fuji-entry.c",
41 "sources/libexif/fuji/mnote-fuji-tag.c",
42 "sources/libexif/olympus/exif-mnote-data-olympus.c",
43 "sources/libexif/olympus/mnote-olympus-entry.c",
44 "sources/libexif/olympus/mnote-olympus-tag.c",
45 "sources/libexif/pentax/exif-mnote-data-pentax.c",
46 "sources/libexif/pentax/mnote-pentax-entry.c",
47 "sources/libexif/pentax/mnote-pentax-tag.c",
50 include_dirs = [ "sources" ]
52 # TODO(GYP): Additional options for non-Windows platforms.
56 # This seems like a hack, but this is what WebKit Win does.
61 ldflags = [ "/DEF:" + rebase_path("libexif.def") ]
63 cflags = [ "/wd4018" ] # Signed/unsigned mismatch in comparison.
65 # TODO(GYP): Handle /analyze switch, when it will be used in GN.
66 } else if (is_linux) {
70 configs -= [ "//build/config/compiler:chromium_code" ]
71 configs += [ "//build/config/compiler:no_chromium_code" ]
73 public_configs = [ ":libexif_config" ]