I need to add libavahi-client3 to cmake dependencies of my project. It is also necessary to verify the existence of libavahi-client3 and libavahi-common3. Problems only with the current library (avahi)
Trying to do the following:
find_package(libavahi-common3) if(NOT libavahi-common3_FOUND) message(ERROR " libavahi-common3 is not found") endif(NOT libavahi-common3_FOUND)
OR this option:
find_library(AVAHI_COMMON_LIBRARY NAMES libavahi-common3) if(NOT AVAHI_COMMON_LIBRARY_FOUND) message(ERROR " libavahi-common3 is not found") endif(NOT AVAHI_COMMON_LIBRARY_FOUND)
Both do not work, I was looking for something like findAvahi.cmake, but did not find anything. So should I write my own search module or is there another better option?
cmake avahi
Anatoliy Leshin
source share