# 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}/examples/common/tracing:commandline",
    "${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
}
