# 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/common_flags.gni")
import("${chip_root}/src/app/icd/icd.gni")

config("server_config") {
  defines = []

  if (chip_app_use_echo) {
    defines += [ "CHIP_APP_USE_ECHO" ]
  }
}

static_library("server") {
  output_name = "libCHIPAppServer"

  sources = [
    "AclStorage.cpp",
    "AclStorage.h",
    "CommissioningModeProvider.h",
    "CommissioningWindowManager.cpp",
    "CommissioningWindowManager.h",
    "DefaultAclStorage.cpp",
    "DefaultAclStorage.h",
    "Dnssd.cpp",
    "Dnssd.h",
    "EchoHandler.cpp",
    "EchoHandler.h",
    "OnboardingCodesUtil.cpp",
    "OnboardingCodesUtil.h",
    "Server.cpp",
    "Server.h",
  ]

  public_configs = [ ":server_config" ]

  cflags = [ "-Wconversion" ]

  public_deps = [
    "${chip_root}/src/app",
    "${chip_root}/src/app/icd:icd_config",
    "${chip_root}/src/app/icd:observer",
    "${chip_root}/src/lib/address_resolve",
    "${chip_root}/src/lib/dnssd",
    "${chip_root}/src/messaging",
    "${chip_root}/src/platform",
    "${chip_root}/src/protocols",
    "${chip_root}/src/setup_payload",
    "${chip_root}/src/transport",
  ]

  if (chip_enable_icd_server) {
    public_deps += [ "${chip_root}/src/app/icd:notifier" ]
  }
}
