I would like to use in my cygwin project Bonjour library for Windows. I have installed this library and I have dnssd.lib
file but CMake doesn't find this library.
If I use this code:
find_path(BONJOUR_PATH dns_sd.h
PATHS "$ENV{BONJOUR_SDK_HOME}/Include")
find_library(BONJOUR_LIBRARY
NAMES dnssd.lib
PATHS "$ENV{BONJOUR_SDK_HOME}/Lib/x64")
include_directories(BONJOUR_PATH)
I am getting such error message:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: BONJOUR_LIBRARY (ADVANCED)
It happens only when I wrap above code inside if(CYGWIN) /* code */ endif()
but if I wrap it inside if(WIN32) /* code */ endif()
then it finds library correctly.
Why this happens?