# 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",
    "AppDelegate.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/server:icd-server-config",
    "${chip_root}/src/app/icd/server:observer",
    "${chip_root}/src/lib/address_resolve",
    "${chip_root}/src/lib/dnssd",
    "${chip_root}/src/lib/dnssd:naming",
    "${chip_root}/src/messaging",
    "${chip_root}/src/platform",
    "${chip_root}/src/protocols",
    "${chip_root}/src/setup_payload",
    "${chip_root}/src/transport",
  ]

  # TODO: Server.cpp uses TestGroupData.h. Unsure why test code would be in such a central place
  #       This dependency is split since it should probably be removed (or naming should
  #       be updated if this is not really "testing" even though headers are Test*.h)
  public_deps += [ "${chip_root}/src/lib/support:testing" ]

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