• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2014 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.
4
5config("jsoncpp_config") {
6  include_dirs = [
7    "source/include",
8    "generated",
9  ]
10
11  # TODO(crbug.com/983223): Update JsonCpp BUILD.gn to remove deprecated
12  # declaration flag.
13  # This temporary flag allowing clients to update to the new version, and then
14  # update to the new StreamWriter and CharReader classes.
15  if (!is_win || is_clang) {
16    cflags_cc = [ "-Wno-deprecated-declarations" ]
17  }
18}
19
20source_set("jsoncpp") {
21  sources = [
22    "generated/version.h",
23    "source/include/json/assertions.h",
24    "source/include/json/config.h",
25    "source/include/json/forwards.h",
26    "source/include/json/json.h",
27    "source/include/json/reader.h",
28    "source/include/json/value.h",
29    "source/include/json/writer.h",
30    "source/src/lib_json/json_reader.cpp",
31    "source/src/lib_json/json_tool.h",
32    "source/src/lib_json/json_value.cpp",
33    "source/src/lib_json/json_writer.cpp",
34  ]
35
36  public_configs = [ ":jsoncpp_config" ]
37
38  defines = [
39    "JSON_USE_EXCEPTION=0",
40    "JSON_USE_NULLREF=0",
41  ]
42
43  include_dirs = [ "source/src/lib_json" ]
44
45  if (!is_win || is_clang) {
46    cflags_cc = [ "-Wno-implicit-fallthrough" ]
47  }
48}
49