# 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/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/fan-stub.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}/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" ]
}
