zeroconf/AvahiPoll: move to lib/avahi/
This commit is contained in:
parent
00a1731085
commit
c0b9339d31
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
#include "ZeroconfAvahi.hxx"
|
||||
#include "AvahiPoll.hxx"
|
||||
#include "avahi/Poll.hxx"
|
||||
#include "ZeroconfInternal.hxx"
|
||||
#include "Listen.hxx"
|
||||
#include "util/Domain.hxx"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "AvahiPoll.hxx"
|
||||
#include "Poll.hxx"
|
||||
#include "event/SocketEvent.hxx"
|
||||
#include "event/CoarseTimerEvent.hxx"
|
||||
#include "time/Convert.hxx"
|
|
@ -0,0 +1,21 @@
|
|||
libavahi_client = dependency('avahi-client', required: get_option('zeroconf') == 'avahi')
|
||||
if not libavahi_client.found()
|
||||
avahi_dep = dependency('', required: false)
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
avahi = static_library(
|
||||
'avahi',
|
||||
'Poll.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
libavahi_client,
|
||||
],
|
||||
)
|
||||
|
||||
avahi_dep = declare_dependency(
|
||||
link_with: avahi,
|
||||
dependencies: [
|
||||
event_dep,
|
||||
],
|
||||
)
|
|
@ -1,6 +1,6 @@
|
|||
zeroconf_option = get_option('zeroconf')
|
||||
|
||||
libavahi_client_dep = dependency('', required: false)
|
||||
avahi_dep = dependency('', required: false)
|
||||
|
||||
if zeroconf_option == 'auto'
|
||||
if is_darwin
|
||||
|
@ -8,12 +8,7 @@ if zeroconf_option == 'auto'
|
|||
elif is_android or is_windows
|
||||
zeroconf_option = 'disabled'
|
||||
elif dbus_dep.found()
|
||||
libavahi_client_dep = dependency('avahi-client', required: false)
|
||||
if libavahi_client_dep.found()
|
||||
zeroconf_option = 'avahi'
|
||||
else
|
||||
zeroconf_option = 'disabled'
|
||||
endif
|
||||
zeroconf_option = 'avahi'
|
||||
else
|
||||
zeroconf_option = 'disabled'
|
||||
endif
|
||||
|
@ -50,8 +45,11 @@ if zeroconf_option == 'bonjour'
|
|||
dependencies: bonjour_deps,
|
||||
)
|
||||
else
|
||||
if not libavahi_client_dep.found()
|
||||
libavahi_client_dep = dependency('avahi-client')
|
||||
subdir('avahi')
|
||||
|
||||
if not avahi_dep.found()
|
||||
zeroconf_dep = dependency('', required: false)
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
conf.set('HAVE_AVAHI', true)
|
||||
|
@ -60,10 +58,9 @@ else
|
|||
'zeroconf_bonjour',
|
||||
'ZeroconfGlue.cxx',
|
||||
'ZeroconfAvahi.cxx',
|
||||
'AvahiPoll.cxx',
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
libavahi_client_dep,
|
||||
avahi_dep,
|
||||
dbus_dep,
|
||||
time_dep,
|
||||
log_dep,
|
||||
|
|
|
@ -105,7 +105,7 @@ test('TestIcu', executable(
|
|||
],
|
||||
))
|
||||
|
||||
if libavahi_client_dep.found()
|
||||
if avahi_dep.found()
|
||||
executable(
|
||||
'run_avahi',
|
||||
'run_avahi.cxx',
|
||||
|
|
Loading…
Reference in New Issue