# Copyright (c) 2021 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/build.gni")
import("//build_overrides/chip.gni")

import("${chip_root}/src/app/chip_data_model.gni")

declare_args() {
  chip_tests_zap_config = "none"
}

chip_data_model("configuration") {
  zap_file = "apps/${chip_tests_zap_config}/config.zap"

  zap_pregenerated_dir = "${chip_root}/zzz_generated/placeholder/${chip_tests_zap_config}/zap-generated"
  is_server = true
}

config("includes") {
  include_dirs = [
    ".",
    "include",
  ]
}

executable("chip-${chip_tests_zap_config}") {
  sources = [
    "AppOptions.cpp",
    "main.cpp",
    "src/bridged-actions-stub.cpp",
    "static-supported-modes-manager.cpp",
  ]

  deps = [
    ":configuration",
    "${chip_root}/examples/platform/linux:app-main",
    "${chip_root}/src/app/tests/suites/commands/delay",
    "${chip_root}/src/app/tests/suites/commands/discovery",
    "${chip_root}/src/app/tests/suites/commands/log",
    "${chip_root}/src/app/tests/suites/credentials:dac_provider",
    "${chip_root}/src/app/tests/suites/pics",
    "${chip_root}/src/lib",
  ]

  include_dirs = [ "include" ]

  cflags = [ "-Wconversion" ]

  output_dir = root_out_dir
}

group("linux") {
  deps = [ ":chip-${chip_tests_zap_config}" ]
}
