# Copyright (c) 2020 Project CHIP Authors
#
# 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/chip.gni")

import("${chip_root}/src/app/chip_data_model.gni")
import("${chip_root}/src/lib/lib.gni")

config("config") {
  include_dirs = [
    ".",
    "${chip_root}/examples/chip-tool",
    "${chip_root}/zzz_generated/chip-tool",
    "${chip_root}/zzz_generated/tv-casting-app",
    "${chip_root}/src/lib",
  ]

  cflags = [ "-Wconversion" ]
}

chip_data_model("tv-casting-common") {
  zap_file = "tv-casting-app.zap"

  zap_pregenerated_dir =
      "${chip_root}/zzz_generated/tv-casting-app/zap-generated"

  sources = [
    "${chip_root}/examples/chip-tool/commands/clusters/ModelCommand.h",
    "${chip_root}/examples/chip-tool/commands/common/CHIPCommand.h",
    "${chip_root}/examples/chip-tool/commands/common/Command.cpp",
    "${chip_root}/examples/chip-tool/commands/common/Command.h",
    "${chip_root}/examples/chip-tool/commands/common/Commands.cpp",
    "${chip_root}/examples/chip-tool/commands/common/Commands.h",
    "${chip_root}/examples/chip-tool/commands/common/CredentialIssuerCommands.h",
    "${chip_root}/examples/chip-tool/commands/common/HexConversion.h",
    "${chip_root}/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp",
    "${chip_root}/examples/chip-tool/commands/common/RemoteDataModelLogger.h",
    "${chip_root}/src/controller/ExamplePersistentStorage.cpp",
    "${chip_root}/src/controller/ExamplePersistentStorage.h",
    "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp",
    "${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp",
    "commands/clusters/ModelCommand.cpp",
    "commands/common/CHIPCommand.cpp",
    "include/AppParams.h",
    "include/ApplicationBasic.h",
    "include/ApplicationLauncher.h",
    "include/CastingServer.h",
    "include/Channel.h",
    "include/ContentLauncher.h",
    "include/KeypadInput.h",
    "include/LevelControl.h",
    "include/MediaBase.h",
    "include/MediaCommandBase.h",
    "include/MediaPlayback.h",
    "include/MediaReadBase.h",
    "include/MediaSubscriptionBase.h",
    "include/OnOff.h",
    "include/PersistenceManager.h",
    "include/TargetEndpointInfo.h",
    "include/TargetNavigator.h",
    "include/TargetVideoPlayerInfo.h",
    "src/AppParams.cpp",
    "src/ApplicationLauncher.cpp",
    "src/CastingServer.cpp",
    "src/Channel.cpp",
    "src/ContentLauncher.cpp",
    "src/KeypadInput.cpp",
    "src/LevelControl.cpp",
    "src/MediaPlayback.cpp",
    "src/OnOff.cpp",
    "src/PersistenceManager.cpp",
    "src/TargetEndpointInfo.cpp",
    "src/TargetNavigator.cpp",
    "src/TargetVideoPlayerInfo.cpp",
  ]

  deps = [
    "${chip_root}/src/app/tests/suites/commands/interaction_model",
    "${chip_root}/src/lib/support/jsontlv",
    "${chip_root}/src/tracing",
    "${chip_root}/src/tracing/log_json",
    "${chip_root}/third_party/inipp",
    "${chip_root}/third_party/jsoncpp",
  ]

  if (chip_enable_transport_trace) {
    public_deps =
        [ "${chip_root}/examples/common/tracing:trace_handlers_decoder" ]
  }

  public_configs = [ ":config" ]

  include_dirs =
      [ "${chip_root}/examples/tv-casting-app/tv-casting-common/include" ]

  is_server = true
}

static_library("tvCastingCommon") {
  public_deps = [
    "${chip_root}/examples/tv-casting-app/tv-casting-common",
    "${chip_root}/src/credentials:default_attestation_verifier",
  ]

  cflags = [ "-Wconversion" ]

  output_name = "libTvCastingCommon"

  output_dir = "${root_out_dir}/lib"

  complete_static_lib = true
}
