Permalink
Browse files

zeroconf on by default, compiler error on x86 (#705)

* zeroconf on by default

dynamic link  zeroconf by default

* revert zerconf to now default to off

* formatting
  • Loading branch information...
1 parent 592c5fc commit 2beb36ecdca3f91c5b5cea52118d5c94fc1e1b3d @penfold42 penfold42 committed with brindosch Jul 13, 2016
Showing with 21 additions and 5 deletions.
  1. +2 −0 CMakeLists.txt
  2. +19 −5 libsrc/bonjour/CMakeLists.txt
View
@@ -18,6 +18,7 @@ SET ( DEFAULT_SPIDEV OFF )
SET ( DEFAULT_WS2812BPWM OFF )
SET ( DEFAULT_WS281XPWM OFF )
SET ( DEFAULT_ZEROCONF OFF )
+SET ( DEFAULT_USE_SHARED_AVAHI_LIBS OFF )
if (APPLE)
SET ( DEFAULT_OSX ON )
@@ -36,6 +37,7 @@ else ()
elseif ( "${PLATFORM}" STREQUAL "x86" )
SET ( DEFAULT_X11 ON )
SET ( DEFAULT_FB ON )
+ SET ( DEFAULT_USE_SHARED_AVAHI_LIBS ON )
elseif ( "${PLATFORM}" STREQUAL "imx6" )
SET ( DEFAULT_FB ON )
endif()
@@ -41,12 +41,26 @@ qt5_use_modules(bonjour Widgets Network)
endif(ENABLE_QT5)
target_link_libraries(bonjour
+ hyperion
+ hyperion-utils
+ ${QT_LIBRARIES})
+
+set(USE_SHARED_AVAHI_LIBS ${DEFAULT_USE_SHARED_AVAHI_LIBS} CACHE BOOL "use avahi libraries from system")
+
+if (USE_SHARED_AVAHI_LIBS)
+ target_link_libraries(bonjour
+ dns_sd
+ avahi-client
+ avahi-common
+ avahi-core
+# avahi-qt4
+ dbus-1)
+else ()
+ target_link_libraries(bonjour
libdns_sd.a
libavahi-client.a
libavahi-common.a
libavahi-core.a
- libavahi-qt4.a
- libdbus-1.a
- hyperion
- hyperion-utils
- ${QT_LIBRARIES})
+# libavahi-qt4.a
+ libdbus-1.a)
+endif ()

0 comments on commit 2beb36e

Please sign in to comment.