blob: 280921a3ca8b8a7106c66a6af6b190d2c5fee0cf [file] [log] [blame]
# 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/nlunit_test.gni")
import("${chip_root}/src/platform/device.gni")
source_set("platform_header") {
sources = [ "platform/Dnssd.h" ]
}
static_library("dnssd") {
public_deps = [
":platform_header",
"${chip_root}/src/crypto",
"${chip_root}/src/lib/core",
"${chip_root}/src/lib/support",
"${chip_root}/src/messaging:messaging_mrp_config",
]
sources = [
"Advertiser.h",
"Resolver.h",
"ServiceNaming.cpp",
"ServiceNaming.h",
"TxtFields.cpp",
"TxtFields.h",
]
if (chip_mdns == "none") {
sources += [
"Advertiser_ImplNone.cpp",
"Resolver_ImplNone.cpp",
]
} else if (chip_mdns == "minimal") {
sources += [
"ActiveResolveAttempts.cpp",
"ActiveResolveAttempts.h",
"Advertiser_ImplMinimalMdns.cpp",
"IncrementalResolve.cpp",
"IncrementalResolve.h",
"MinimalMdnsServer.cpp",
"MinimalMdnsServer.h",
"Resolver_ImplMinimalMdns.cpp",
]
public_deps += [
"${chip_root}/src/lib/dnssd/minimal_mdns",
"${chip_root}/src/trace",
]
} else if (chip_mdns == "platform") {
sources += [
"Discovery_ImplPlatform.cpp",
"Discovery_ImplPlatform.h",
]
public_deps += [ "${chip_root}/src/platform" ]
} else {
assert(false, "Unknown Dnssd advertiser implementation.")
}
}