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 # TODO(thestig): Properly support building on Linux. | 7 # TODO(thestig): Properly support building on Linux. |
8 config("libexif_config") { | 8 config("libexif_config") { |
9 include_dirs = [ "sources" ] | 9 include_dirs = [ "sources" ] |
10 if (is_clang) { | 10 if (is_clang) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 "sources/libexif/pentax/exif-mnote-data-pentax.c", | 50 "sources/libexif/pentax/exif-mnote-data-pentax.c", |
51 "sources/libexif/pentax/mnote-pentax-entry.c", | 51 "sources/libexif/pentax/mnote-pentax-entry.c", |
52 "sources/libexif/pentax/mnote-pentax-tag.c", | 52 "sources/libexif/pentax/mnote-pentax-tag.c", |
53 ] | 53 ] |
54 | 54 |
55 include_dirs = [ "sources" ] | 55 include_dirs = [ "sources" ] |
56 | 56 |
57 # TODO(GYP): Additional options for non-Windows platforms. | 57 # TODO(GYP): Additional options for non-Windows platforms. |
58 | 58 |
59 if (is_win) { | 59 if (is_win) { |
60 defines = [ | 60 import("//build/config/win/visual_studio_version.gni") |
61 # This seems like a hack, but this is what WebKit Win does. | 61 |
62 "snprintf=_snprintf", | 62 if (visual_studio_version == "2013" || visual_studio_version == "2013e") { |
63 "inline=__inline", | 63 defines = [ |
64 ] | 64 # This seems like a hack, but this is what WebKit Win does. |
| 65 # VS 2015 supports these natively so they cannot be #defines. |
| 66 "snprintf=_snprintf", |
| 67 "inline=__inline", |
| 68 ] |
| 69 } |
65 | 70 |
66 ldflags = [ "/DEF:" + rebase_path("libexif.def") ] | 71 ldflags = [ "/DEF:" + rebase_path("libexif.def") ] |
67 | 72 |
68 cflags = [ "/wd4018" ] # Signed/unsigned mismatch in comparison. | 73 cflags = [ "/wd4018" ] # Signed/unsigned mismatch in comparison. |
69 | 74 |
70 # TODO(GYP): Handle /analyze switch, when it will be used in GN. | 75 # TODO(GYP): Handle /analyze switch, when it will be used in GN. |
71 } else if (is_linux) { | 76 } else if (is_linux) { |
72 libs = [ "m" ] | 77 libs = [ "m" ] |
73 } | 78 } |
74 | 79 |
75 configs -= [ "//build/config/compiler:chromium_code" ] | 80 configs -= [ "//build/config/compiler:chromium_code" ] |
76 configs += [ "//build/config/compiler:no_chromium_code" ] | 81 configs += [ "//build/config/compiler:no_chromium_code" ] |
77 | 82 |
78 public_configs = [ ":libexif_config" ] | 83 public_configs = [ ":libexif_config" ] |
79 } | 84 } |
80 } | 85 } |
OLD | NEW |