# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")
import("../../gn/fuzzer.gni")
import("../../gn/perfetto.gni")
import("../../gn/test.gni")

# Separate target because the embedder might not want this (e.g. on Windows).
if (is_linux || is_mac || is_android) {
  source_set("platform_posix") {
    deps = [
      "../../gn:default_deps",
      "../../include/perfetto/tracing",
      "../base",
    ]
    sources = [
      "platform_posix.cc",
    ]
  }
}

# Fake platform that allows buiding the client lib on all OSes. You can only use
# those parts of the client lib that do not use the platform.
source_set("platform_fake") {
  deps = [
    "../../gn:default_deps",
    "../../include/perfetto/tracing",
  ]
  sources = [
    "platform_fake.cc",
  ]
}

# Code that both public headers and other non-public sources (e.g.
# src/tracing/core) need to depend on. It cannot be in the root :tracing target
# otherwise there would be a cyclic dependency because public itself needs to
# depend on tracing.
source_set("common") {
  deps = [
    "../../gn:default_deps",
    "../../include/perfetto/tracing",
  ]
  sources = [
    "trace_writer_base.cc",
  ]
}

source_set("client_api") {
  deps = [
    "../../include/perfetto/tracing/core",
    "../../protos/perfetto/config:cpp",
    "../base",
    "core",
  ]
  public_deps = [
    "../../gn:default_deps",
    "../../include/perfetto/tracing",
  ]
  sources = [
    "data_source.cc",
    "debug_annotation.cc",
    "event_context.cc",
    "internal/in_process_tracing_backend.cc",
    "internal/in_process_tracing_backend.h",
    "internal/tracing_muxer_impl.cc",
    "internal/tracing_muxer_impl.h",
    "internal/track_event_internal.cc",
    "platform.cc",
    "tracing.cc",
    "track.cc",
    "track_event_category_registry.cc",
    "virtual_destructors.cc",
  ]

  if (enable_perfetto_ipc) {
    deps += [
      "ipc/consumer",
      "ipc/producer",
      "ipc/service",
    ]
    sources += [
      "internal/system_tracing_backend.cc",
      "internal/system_tracing_backend.h",
    ]
  }
}
