avahi - find libavahi with cmake -


i need add libavahi-client3 cmake dependency of project. need check libavahi-client3 , libavahi-common3 existence. problems current library(avahi)

trying these things:

find_package(libavahi-common3) if(not libavahi-common3_found) message(error " libavahi-common3 not found") endif(not libavahi-common3_found) 

or variant:

find_library(avahi_common_library names libavahi-common3) if(not avahi_common_library_found) message(error " libavahi-common3 not found") endif(not avahi_common_library_found) 

both not work, searched findavahi.cmake, found nothing. should write own search module or there better option?

there no find script avahi shipping cmake, why first example not work. important understand find_package runs external find script, not perform searching itself.

your second example broken, mixing idioms find_library , find_package. please read on documentation of find_library , find_path find required libraries , include paths.

if want can turn find script later (look @ scripts in cmake's module directory idea such script should like), allow use more compact find_package locating library again. note writing find script works reasonably on different platforms complex task require research effort right.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -