# 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")

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

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

config("config") {
  include_dirs = [
    "include",
    "clusters",
  ]
  if (chip_build_libshell) {
    include_dirs += [ "shell" ]
  }
}

source_set("tv-common-sources") {
  deps = [
    "${chip_root}/examples/platform/linux:app-main",
    "${chip_root}/examples/tv-app/tv-common",
    "${chip_root}/src/lib",
  ]
  public_configs = [ ":config" ]
  sources = [
    "clusters/account-login/AccountLoginManager.cpp",
    "clusters/account-login/AccountLoginManager.h",
    "clusters/application-basic/ApplicationBasicManager.cpp",
    "clusters/application-basic/ApplicationBasicManager.h",
    "clusters/application-launcher/ApplicationLauncherManager.cpp",
    "clusters/application-launcher/ApplicationLauncherManager.h",
    "clusters/audio-output/AudioOutputManager.cpp",
    "clusters/audio-output/AudioOutputManager.h",
    "clusters/channel/ChannelManager.cpp",
    "clusters/channel/ChannelManager.h",
    "clusters/content-control/ContentController.cpp",
    "clusters/content-control/ContentController.h",
    "clusters/content-launcher/ContentLauncherManager.cpp",
    "clusters/content-launcher/ContentLauncherManager.h",
    "clusters/keypad-input/KeypadInputManager.cpp",
    "clusters/keypad-input/KeypadInputManager.h",
    "clusters/low-power/LowPowerManager.cpp",
    "clusters/low-power/LowPowerManager.h",
    "clusters/media-input/MediaInputManager.cpp",
    "clusters/media-input/MediaInputManager.h",
    "clusters/media-playback/MediaPlaybackManager.cpp",
    "clusters/media-playback/MediaPlaybackManager.h",
    "clusters/target-navigator/TargetNavigatorManager.cpp",
    "clusters/target-navigator/TargetNavigatorManager.h",
    "clusters/wake-on-lan/WakeOnLanManager.cpp",
    "clusters/wake-on-lan/WakeOnLanManager.h",
    "include/AppTv.h",
    "include/CHIPProjectAppConfig.h",
    "src/AppTv.cpp",
    "src/ZCLCallbacks.cpp",
  ]

  if (chip_build_libshell) {
    sources += [
      "shell/AppTvShellCommands.cpp",
      "shell/AppTvShellCommands.h",
    ]
  }
}
