| # Copyright 2022 The Fuchsia 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/components.gni") |
| |
| # TCG TSS 2.0 Fuchsia TCTI Bridge for fuchsia.tpm.Command. This is the default |
| # library that should be used by most applications. |
| shared_library("agent") { |
| include_dirs = [ |
| "include", |
| "src", |
| ] |
| sources = [ "src/fuchsia-tcti-agent.cc" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.tpm:fuchsia.tpm_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//sdk/lib/fdio", |
| "//sdk/lib/syslog/cpp", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| # TCG TSS 2.0 Fuchsia TCTI Bridge for fuchsia.tpm.TpmDevice. This is a |
| # specalist library implementation that should be used by implementors of |
| # fuchsia.tpm.Command. |
| static_library("device") { |
| include_dirs = [ |
| "include", |
| "src", |
| ] |
| sources = [ "src/fuchsia-tcti-device.cc" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.tpm:fuchsia.tpm_cpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//sdk/lib/fdio", |
| "//sdk/lib/syslog/cpp", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| executable("fuchsia-tcti-tests-agent-bin") { |
| sources = [ "src/fuchsia-tcti-unittests.cc" ] |
| deps = [ |
| ":agent", |
| "//sdk/fidl/fuchsia.tpm:fuchsia.tpm_cpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| ] |
| testonly = true |
| } |
| |
| executable("fuchsia-tcti-tests-device-bin") { |
| sources = [ "src/fuchsia-tcti-unittests.cc" ] |
| deps = [ |
| ":device", |
| "//sdk/fidl/fuchsia.tpm:fuchsia.tpm_cpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| ] |
| testonly = true |
| } |
| |
| fuchsia_unittest_package("fuchsia-tcti-tests") { |
| deps = [ |
| ":fuchsia-tcti-tests-agent-bin", |
| ":fuchsia-tcti-tests-device-bin", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fuchsia-tcti-tests" ] |
| } |