aboutsummaryrefslogtreecommitdiff
path: root/third_party/valijson/BUILD.gn
blob: 8df845987e11ae6632889eae88a282ace273a083 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright 2020 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.

import("//build_overrides/build.gni")

if (!build_with_chromium) {
  config("valijson_config") {
    cflags_cc = [ "-Wno-extra-semi" ]

    # NOTE: while this allows files to use #include "valijson/<foo>.hpp", Open
    # Screen files should use the fully qualified include and this should be
    # reserved for valijson files to include each other.
    include_dirs = [ "//third_party/valijson/src/include" ]
  }

  source_set("valijson") {
    sources = [
      "src/include/valijson/adapters/adapter.hpp",
      "src/include/valijson/adapters/basic_adapter.hpp",
      "src/include/valijson/adapters/frozen_value.hpp",

      # We only need the adapter for JsonCpp.
      "src/include/valijson/adapters/jsoncpp_adapter.hpp",
      "src/include/valijson/constraints_builder.hpp",
      "src/include/valijson/internal/custom_allocator.hpp",
      "src/include/valijson/internal/debug.hpp",
      "src/include/valijson/internal/json_pointer.hpp",
      "src/include/valijson/internal/json_reference.hpp",
      "src/include/valijson/internal/optional.hpp",
      "src/include/valijson/internal/uri.hpp",
      "src/include/valijson/schema.hpp",
      "src/include/valijson/schema_parser.hpp",
      "src/include/valijson/subschema.hpp",
      "src/include/valijson/utils/jsoncpp_utils.hpp",
      "src/include/valijson/validation_results.hpp",
      "src/include/valijson/validation_visitor.hpp",
      "src/include/valijson/validator.hpp",
    ]

    defines = [ "VALIJSON_USE_EXCEPTIONS=0" ]
    public_configs = [ ":valijson_config" ]
  }
}