# 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("//build_overrides/tizen.gni")

import("${chip_root}/build/chip/tools.gni")
import("${chip_root}/src/app/common_flags.gni")

import("${tizen_sdk_build_root}/tizen_sdk.gni")
assert(chip_build_tools)

source_set("chip-all-clusters-common") {
  sources = [
    "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp",
    "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp",
    "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
    "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp",
    "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp",
    "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp",
    "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp",
    "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
    "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
  ]

  deps = [
    "${chip_root}/examples/all-clusters-app/all-clusters-common",
    "${chip_root}/examples/platform/tizen:app-main",
    "${chip_root}/src/lib/shell:shell_core",
  ]

  include_dirs =
      [ "${chip_root}/examples/all-clusters-app/all-clusters-common/include" ]
}

executable("chip-all-clusters-app") {
  sources = [
    "include/CHIPProjectAppConfig.h",
    "src/main.cpp",
  ]

  deps = [
    ":chip-all-clusters-common",
    "${chip_root}/examples/all-clusters-app/all-clusters-common",
    "${chip_root}/examples/platform/tizen:app-main",
    "${chip_root}/src/lib",
  ]

  include_dirs = [
    "${chip_root}/examples/all-clusters-app/all-clusters-common/include",
    "include",
  ]

  output_dir = root_out_dir
}

tizen_sdk_package("chip-all-clusters-app:tpk") {
  deps = [
    ":chip-all-clusters-app",
    "${chip_root}/examples/platform/tizen:author-certificate-CHIP",
  ]
  manifest = "tizen-manifest.xml"
  sign_security_profile = "CHIP"
}

group("tizen") {
  deps = [ ":chip-all-clusters-app" ]
}

group("tizen:tpk") {
  deps = [ ":chip-all-clusters-app:tpk" ]
}

group("default") {
  deps = [ ":tizen" ]
}
