From 52476752a9b3d5c3e3e270d79f0c94e88e2db563 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Thu, 12 Mar 2020 00:30:42 -0400 Subject: [PATCH 1/2] Cmake: restore installing the Avahi service file During commit 804216ac90db998ad01b1774e93cb49497b90187 we accidently dropped the CMAKE setting HAVE_AVAHI, however, this flag controls the setting to install the avahi service file, so it's no longer installed. This fixes it by adding it back. Signed-off-by: Robin Getz --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b195eb08..a137a1511 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -265,6 +265,7 @@ if(WITH_NETWORK_BACKEND) elseif(AVAHI_CLIENT_LIBRARIES AND AVAHI_COMMON_LIBRARIES) message(STATUS "Building with Avahi, a DNS SD implementation") set(HAVE_DNS_SD ON) + set(HAVE_AVAHI ON) list(APPEND LIBIIO_CFILES dns_sd_avahi.c) set(AVAHI_LIBRARIES ${AVAHI_CLIENT_LIBRARIES} ${AVAHI_COMMON_LIBRARIES}) From 9501cb9ffbc3314612e68710362a66750e9ad24a Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Fri, 13 Mar 2020 11:56:05 -0400 Subject: [PATCH 2/2] Cmake : move HAVE_DNS_SD to iio-config.h the cmake settings needed by source should be in in the iio-config.h not added to the CFLAGS Signed-off-by: Robin Getz --- CMakeLists.txt | 4 ---- iio-config.h.cmakein | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a137a1511..dadae118d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -275,10 +275,6 @@ if(WITH_NETWORK_BACKEND) message(STATUS "Building without DNS-SD (Zeroconf) support") endif() - if (HAVE_DNS_SD) - add_definitions(-DHAVE_DNS_SD=1) - endif() - set(NEED_THREADS 1) set(IIOD_CLIENT 1) set(NEED_LIBXML2 1) diff --git a/iio-config.h.cmakein b/iio-config.h.cmakein index 580e78a50..bb3f3ed80 100644 --- a/iio-config.h.cmakein +++ b/iio-config.h.cmakein @@ -24,6 +24,7 @@ #cmakedefine HAS_NEWLOCALE #cmakedefine HAS_PTHREAD_SETNAME_NP #cmakedefine HAVE_IPV6 +#cmakedefine HAVE_DNS_SD #cmakedefine HAVE_AVAHI #cmakedefine NO_THREADS #cmakedefine HAS_LIBUSB_GETVERSION