From 7b066b1aedc9b70fa8209de4b33649b62f037d2b Mon Sep 17 00:00:00 2001 From: probonopd Date: Fri, 28 Oct 2022 20:54:37 +0200 Subject: [PATCH] Fix building on FreeBSD, including the example Closes #55 --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b1a30bf..4e1ba0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,16 +24,17 @@ else() target_compile_definitions(QtZeroConf PUBLIC QZEROCONF_STATIC) endif() -if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") find_library(avahi-client-lib avahi-client REQUIRED) find_library(avahi-common-lib avahi-common REQUIRED) find_path(avahi-client-includes avahi-client/client.h REQUIRED) + find_path(avahi-common-includes avahi-common/defs.h REQUIRED) target_sources(QtZeroConf PRIVATE avahi-qt/qt-watch_p.h avahi-qt/qt-watch.cpp avahiclient.cpp ) - target_include_directories(QtZeroConf PRIVATE ${avahi-client-includes}) + target_include_directories(QtZeroConf PRIVATE ${avahi-client-includes} ${avahi-common-includes}) list(APPEND ${PUBLIC_HEADERS} avahi-qt/qt-watch.h )