[phodav: 5/8] build-sys: move avahi-common to bin/



commit 78ef6059deffa9c59727d4d14cc63be448367293
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Thu Mar 5 12:59:13 2020 +0100

    build-sys: move avahi-common to bin/
    
    Since it is only used there.
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 avahi-common.c => bin/avahi-common.c | 0
 avahi-common.h => bin/avahi-common.h | 0
 bin/meson.build                      | 5 +++++
 meson.build                          | 2 --
 4 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/avahi-common.c b/bin/avahi-common.c
similarity index 100%
rename from avahi-common.c
rename to bin/avahi-common.c
diff --git a/avahi-common.h b/bin/avahi-common.h
similarity index 100%
rename from avahi-common.h
rename to bin/avahi-common.h
diff --git a/bin/meson.build b/bin/meson.build
index 4b3da2e..22262bc 100644
--- a/bin/meson.build
+++ b/bin/meson.build
@@ -4,6 +4,11 @@ if host_machine.system() == 'windows'
   win32_deps += compiler.find_library('mpr')
 endif
 
+avahi_common = []
+if conf.has('WITH_AVAHI')
+  avahi_common += files('avahi-common.c')
+endif
+
 sources = [
   'spice-webdavd.c',
   'output-queue.c',
diff --git a/meson.build b/meson.build
index 34c83fd..184b186 100644
--- a/meson.build
+++ b/meson.build
@@ -40,10 +40,8 @@ deps += dependency('libxml-2.0')
 d1 = dependency('avahi-gobject', required : get_option('avahi'))
 d2 = dependency('avahi-client', required : get_option('avahi'))
 avahi_deps = []
-avahi_common = []
 if d1.found() and d2.found()
   avahi_deps += [ d1, d2 ]
-  avahi_common += [ '../avahi-common.c', ]
   conf.set('WITH_AVAHI', 1)
 endif
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]