xref: /aosp_15_r20/external/openscreen/third_party/valijson/BUILD.gn (revision 3f982cf4871df8771c9d4abe6e9a6f8d829b2736)
1# Copyright 2020 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
5import("//build_overrides/build.gni")
6
7if (!build_with_chromium) {
8  config("valijson_config") {
9    cflags_cc = [ "-Wno-extra-semi" ]
10
11    # NOTE: while this allows files to use #include "valijson/<foo>.hpp", Open
12    # Screen files should use the fully qualified include and this should be
13    # reserved for valijson files to include each other.
14    include_dirs = [ "//third_party/valijson/src/include" ]
15  }
16
17  source_set("valijson") {
18    sources = [
19      "src/include/valijson/adapters/adapter.hpp",
20      "src/include/valijson/adapters/basic_adapter.hpp",
21      "src/include/valijson/adapters/frozen_value.hpp",
22
23      # We only need the adapter for JsonCpp.
24      "src/include/valijson/adapters/jsoncpp_adapter.hpp",
25      "src/include/valijson/constraint_builder.hpp",
26      "src/include/valijson/internal/custom_allocator.hpp",
27      "src/include/valijson/internal/debug.hpp",
28      "src/include/valijson/internal/json_pointer.hpp",
29      "src/include/valijson/internal/json_reference.hpp",
30      "src/include/valijson/internal/optional.hpp",
31      "src/include/valijson/internal/uri.hpp",
32      "src/include/valijson/schema.hpp",
33      "src/include/valijson/schema_parser.hpp",
34      "src/include/valijson/subschema.hpp",
35      "src/include/valijson/utils/jsoncpp_utils.hpp",
36      "src/include/valijson/validation_results.hpp",
37      "src/include/valijson/validation_visitor.hpp",
38      "src/include/valijson/validator.hpp",
39    ]
40
41    defines = [ "VALIJSON_USE_EXCEPTIONS=0" ]
42    public_configs = [ ":valijson_config" ]
43  }
44}
45