| # Copyright 2018 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/cpp/sdk_source_set.gni") |
| import("//build/fidl/fidl.gni") |
| import("//build/package.gni") |
| import("//build/test.gni") |
| import("//sdk/cts/build/cts.gni") |
| import("//src/sys/build/components.gni") |
| import("//src/tests/fidl/conformance_suite/gidl-conformance-suite.gni") |
| import("//tools/fidl/gidl/gidl.gni") |
| |
| # The complete high-level C++ bindings library supporting both asynchronous |
| # and synchronous APIs. |
| sdk_source_set("cpp") { |
| category = "partner" |
| |
| sdk_name = "fidl_cpp" |
| |
| sources = [ |
| "binding.h", |
| "binding_set.h", |
| "event_sender.h", |
| "interface_ptr.h", |
| "interface_ptr_set.h", |
| "internal/header.h", |
| "internal/implementation.h", |
| "internal/message_handler.cc", |
| "internal/message_handler.h", |
| "internal/message_reader.cc", |
| "internal/message_reader.h", |
| "internal/pending_response.cc", |
| "internal/pending_response.h", |
| "internal/proxy.cc", |
| "internal/proxy.h", |
| "internal/proxy_controller.cc", |
| "internal/proxy_controller.h", |
| "internal/stub.cc", |
| "internal/stub.h", |
| "internal/stub_controller.cc", |
| "internal/stub_controller.h", |
| "internal/weak_stub_controller.cc", |
| "internal/weak_stub_controller.h", |
| "member_connector.h", |
| "optional.h", |
| "service_connector.h", |
| "service_handler_base.h", |
| "thread_safe_binding_set.h", |
| "type_converter.h", |
| ] |
| |
| include_base = "//sdk" |
| |
| public_deps = [ |
| ":cpp_sync", |
| "//zircon/public/lib/async", |
| "//zircon/public/lib/fidl", |
| "//zircon/public/lib/fit", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-default", |
| ] |
| |
| public_configs = [ "//sdk/config" ] |
| } |
| |
| # The synchronous high-level C++ bindings library. |
| sdk_source_set("cpp_sync") { |
| category = "partner" |
| |
| sdk_name = "fidl_cpp_sync" |
| |
| sources = [ |
| "internal/logging.cc", |
| "internal/logging.h", |
| "internal/message_sender.cc", |
| "internal/message_sender.h", |
| "internal/synchronous_proxy.cc", |
| "internal/synchronous_proxy.h", |
| "synchronous_interface_ptr.h", |
| ] |
| |
| include_base = "//sdk" |
| |
| public_configs = [ "//sdk/config" ] |
| |
| public_deps = [ |
| ":cpp_base", |
| "//zircon/public/lib/fidl", |
| "//zircon/public/lib/fit", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| # The base library used to implement the natural domain-object types. |
| # It should not contain message dispatching functionality. |
| sdk_source_set("cpp_base") { |
| category = "partner" |
| |
| sdk_name = "fidl_cpp_base" |
| |
| sources = [ |
| "clone.cc", |
| "clone.h", |
| "coding_traits.h", |
| "comparison.h", |
| "decoder.cc", |
| "decoder.h", |
| "encoder.cc", |
| "encoder.h", |
| "enum.h", |
| "interface_handle.h", |
| "interface_request.h", |
| "internal/bitset.h", |
| "internal/natural_types_header.h", |
| "internal/natural_types_implementation.h", |
| "object_coding.h", |
| "string.h", |
| "traits.h", |
| "transition.h", |
| "types.h", |
| "vector.h", |
| ] |
| |
| include_base = "//sdk" |
| |
| public_configs = [ "//sdk/config" ] |
| |
| public_deps = [ |
| "//zircon/public/lib/fidl_base", |
| "//zircon/public/lib/fit", |
| ] |
| |
| if (is_fuchsia) { |
| public_deps += [ |
| "//zircon/public/lib/fidl", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| } |
| |
| cts_source_set("test_support") { |
| testonly = true |
| |
| public = [ "test/async_loop_for_test.h" ] |
| |
| public_deps = [ "//zircon/public/lib/async" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| "fuzzing:tests", |
| "//sdk/cts/tests/pkg/fidl/cpp:tests", |
| ] |
| } |