From df22cb00ddfa9a7a3ee93e95611a76e03f1e87cd Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Sat, 28 May 2022 06:44:01 +0200 Subject: [PATCH] Only add avahi as build dependency when platform mDNS is selected (#18899) * Only add avahi as build dependency when platform mDNS is selected * Remove duplicate global avahi check for linux platform --- src/platform/BUILD.gn | 6 ------ src/platform/Linux/BUILD.gn | 4 ++-- src/platform/webos/BUILD.gn | 4 ++-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 89af9d84165d7e..c6933290d1ac9b 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -30,12 +30,6 @@ if (chip_enable_openthread) { } } -if (chip_device_platform == "linux" && chip_mdns != "none") { - pkg_config("avahi_client_config") { - packages = [ "avahi-client" ] - } -} - if (chip_device_platform != "none" && chip_device_platform != "external") { declare_args() { # Extra header to include in CHIPDeviceConfig.h for project. diff --git a/src/platform/Linux/BUILD.gn b/src/platform/Linux/BUILD.gn index bf40d4b84ca99b..7f46aee3dcfc0b 100644 --- a/src/platform/Linux/BUILD.gn +++ b/src/platform/Linux/BUILD.gn @@ -26,7 +26,7 @@ if (chip_enable_openthread) { import("//build_overrides/ot_br_posix.gni") } -if (chip_mdns != "none") { +if (chip_mdns == "platform") { pkg_config("avahi_client_config") { packages = [ "avahi-client" ] } @@ -92,7 +92,7 @@ static_library("Linux") { public_configs = [] - if (chip_mdns != "none") { + if (chip_mdns == "platform") { sources += [ "DnssdImpl.cpp", "DnssdImpl.h", diff --git a/src/platform/webos/BUILD.gn b/src/platform/webos/BUILD.gn index 50f8f571c928c4..cd837a03736c9f 100644 --- a/src/platform/webos/BUILD.gn +++ b/src/platform/webos/BUILD.gn @@ -31,7 +31,7 @@ if (chip_enable_openthread) { import("//build_overrides/ot_br_posix.gni") } -if (chip_mdns != "none") { +if (chip_mdns == "platform") { pkg_config("avahi_client_config") { packages = [ "avahi-client" ] } @@ -111,7 +111,7 @@ static_library("webos") { public_configs = [] - if (chip_mdns != "none") { + if (chip_mdns == "platform") { sources += [ "DnssdImpl.cpp", "DnssdImpl.h",