blob: 29270fd8635d8c212c0aa4510598ce03bd3dd30e [file] [log] [blame]
# 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/components.gni")
import("//build/cpp/sdk_source_set.gni")
import("//build/fidl/fidl.gni")
import("//build/test.gni")
import("//sdk/cts/build/cts.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",
"service_connector.h",
"service_handler_base.h",
"type_converter.h",
]
include_base = "//sdk"
public_deps = [
":cpp_sync",
"//sdk/lib/fit",
"//sdk/lib/fit-promise",
"//sdk/lib/stdcompat",
"//zircon/system/ulib/async",
"//zircon/system/ulib/async-default",
"//zircon/system/ulib/fidl",
"//zircon/system/ulib/zx",
]
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",
"//sdk/lib/fit",
"//zircon/system/ulib/fidl",
"//zircon/system/ulib/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",
"internal/bitset.h",
"internal/natural_types_header.h",
"internal/natural_types_implementation.h",
"message.cc",
"message.h",
"message_buffer.cc",
"message_buffer.h",
"message_part.h",
"string.h",
"traits.h",
"types.h",
"vector.h",
]
include_base = "//sdk"
public_configs = [ "//sdk/config" ]
public_deps = [
"//sdk/lib/fit",
"//sdk/lib/fit-promise",
"//sdk/lib/stdcompat",
"//zircon/system/ulib/fidl:fidl_base",
]
if (is_fuchsia) {
sources += [
"interface_handle.h",
"interface_request.h",
]
public_deps += [
"//zircon/system/ulib/fidl",
"//zircon/system/ulib/zx",
]
}
}