direwolf/cmake/modules/FindAvahi.cmake

20 lines
615 B
CMake
Raw Permalink Normal View History

find_library(AVAHI_COMMON_LIBRARY NAMES avahi-common PATHS ${PC_AVAHI_CLIENT_LIBRARY_DIRS})
if(AVAHI_COMMON_LIBRARY)
set(AVAHI_COMMON_FOUND TRUE)
endif()
find_library(AVAHI_CLIENT_LIBRARY NAMES avahi-client PATHS ${PC_AVAHI_CLIENT_LIBRARY_DIRS})
if(AVAHI_CLIENT_LIBRARY)
set(AVAHI_CLIENT_FOUND TRUE)
endif()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Avahi DEFAULT_MSG AVAHI_COMMON_FOUND AVAHI_CLIENT_FOUND)
if (AVAHI_FOUND)
set(AVAHI_INCLUDE_DIRS ${AVAHI_UI_INCLUDE_DIR})
set(AVAHI_LIBRARIES ${AVAHI_COMMON_LIBRARY} ${AVAHI_CLIENT_LIBRARY})
endif()
mark_as_advanced(AVAHI_INCLUDE_DIRS AVAHI_LIBRARIES)