# 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/device-energy-management-stub.cpp",
    "${chip_root}/examples/all-clusters-app/all-clusters-common/src/electrical-energy-measurement-stub.cpp",
    "${chip_root}/examples/all-clusters-app/all-clusters-common/src/electrical-power-measurement-stub.cpp",
    "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-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/oven-modes.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",
    "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
    "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
    "${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
    "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
    "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.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",
    "${chip_root}/examples/energy-management-app/energy-management-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" ]
}
