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