| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # Linux should use system libexif | 5 # Linux should use system libexif |
| 6 if (!is_linux || is_chromeos) { | 6 if (!is_linux || is_chromeos) { |
| 7 |
| 7 # TODO(thestig): Properly support building on Linux. | 8 # TODO(thestig): Properly support building on Linux. |
| 8 config("libexif_config") { | 9 config("libexif_config") { |
| 9 include_dirs = [ "sources" ] | 10 include_dirs = [ "sources" ] |
| 10 if (is_clang) { | |
| 11 cflags = [ | |
| 12 "-Wno-enum-conversion", | |
| 13 "-Wno-switch", | |
| 14 "-Wno-format", | |
| 15 | |
| 16 # libexif uses fabs(int) to cast to float. | |
| 17 "-Wno-absolute-value", | |
| 18 ] | |
| 19 } | |
| 20 } | 11 } |
| 21 | 12 |
| 22 static_library("libexif") { | 13 static_library("libexif") { |
| 23 sources = [ | 14 sources = [ |
| 24 "sources/libexif/exif-byte-order.c", | 15 "sources/libexif/exif-byte-order.c", |
| 25 "sources/libexif/exif-content.c", | 16 "sources/libexif/exif-content.c", |
| 26 "sources/libexif/exif-data.c", | 17 "sources/libexif/exif-data.c", |
| 27 "sources/libexif/exif-entry.c", | 18 "sources/libexif/exif-entry.c", |
| 28 "sources/libexif/exif-format.c", | 19 "sources/libexif/exif-format.c", |
| 29 "sources/libexif/exif-ifd.c", | 20 "sources/libexif/exif-ifd.c", |
| (...skipping 23 matching lines...) Expand all Loading... |
| 53 | 44 |
| 54 if (is_win) { | 45 if (is_win) { |
| 55 defines = [ | 46 defines = [ |
| 56 # This seems like a hack, but this is what WebKit Win does. | 47 # This seems like a hack, but this is what WebKit Win does. |
| 57 "snprintf=_snprintf", | 48 "snprintf=_snprintf", |
| 58 "inline=__inline", | 49 "inline=__inline", |
| 59 ] | 50 ] |
| 60 | 51 |
| 61 ldflags = [ "/DEF:" + rebase_path("libexif.def") ] | 52 ldflags = [ "/DEF:" + rebase_path("libexif.def") ] |
| 62 | 53 |
| 63 cflags = [ "/wd4018" ] # size/unsigned mismatch | 54 cflags = [ |
| 55 "/wd4018", # size/unsigned mismatch |
| 56 ] |
| 64 | 57 |
| 65 # TODO(GYP): Handle /analyze switch, when it will be used in GN. | 58 # TODO(GYP): Handle /analyze switch, when it will be used in GN. |
| 66 } else if (is_linux) { | 59 } else if (is_linux) { |
| 67 libs = [ "m" ] | 60 libs = [ "m" ] |
| 68 } | 61 } |
| 69 | 62 |
| 70 configs -= [ "//build/config/compiler:chromium_code" ] | 63 configs -= [ "//build/config/compiler:chromium_code" ] |
| 71 configs += [ "//build/config/compiler:no_chromium_code" ] | 64 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 72 | 65 |
| 73 public_configs = [ ":libexif_config" ] | 66 public_configs = [ ":libexif_config" ] |
| 74 } | 67 } |
| 75 } | 68 } |
| OLD | NEW |