blob: 992d821b810c0768deea0a68ff86bf1939075f6f [file] [log] [blame]
# Copyright 2018 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.
# This BUILD.gn file is specific to the standalone project. Do not
# copy this downstream.
import("//testing/test.gni")
static_library("crdtp") {
sources = [
"crdtp/cbor.cc",
"crdtp/cbor.h",
"crdtp/export.h",
"crdtp/glue.h",
"crdtp/json.cc",
"crdtp/json.h",
"crdtp/parser_handler.h",
"crdtp/serializable.cc",
"crdtp/serializable.h",
"crdtp/span.h",
"crdtp/status.cc",
"crdtp/status.h",
]
deps = [
":crdtp_platform",
]
}
# A small adapter library which only :crdtp may depend on.
static_library("crdtp_platform") {
sources = [
"crdtp/json_platform.h",
"crdtp/json_platform.cc",
]
}
# In this (upstream) standalone package, we declare crdtp_test, and a
# few minimal files in testing (accessed via test_platform.{h,cc}) to
# make it look like Chromium's testing package. In Chromium,
# we run these tests as part of the content_unittests, declared in
# content/test/BUILD.gn, and in V8, we run them via unittests, declared
# in test/unittests/BUILD.gn.
test("crdtp_test") {
sources = [
"crdtp/cbor_test.cc",
"crdtp/glue_test.cc",
"crdtp/json_test.cc",
"crdtp/serializable_test.cc",
"crdtp/span_test.cc",
"crdtp/status_test.cc",
]
include_dirs = [ "." ]
deps = [
":crdtp",
":crdtp_test_platform",
]
}
# A small adapter library which only :crdtp_test may depend on.
static_library("crdtp_test_platform") {
sources = [
"crdtp/test_platform.cc",
"crdtp/test_platform.h",
]
testonly = true
include_dirs = [ "." ]
public_deps = [
"//base",
"//testing/gmock",
"//testing/gtest",
"//testing/gtest:gtest_main",
]
}
# A command line utility for converting between JSON and CBOR.
executable("transcode") {
sources = [
"crdtp/transcode.cc",
]
deps = [
":crdtp",
]
}