Use corresponding Bonjour libs for different versions of OS

This commit is contained in:
Jerry (Xinyu Hou) 2018-03-20 11:41:38 +00:00 committed by GitHub
parent 5bd12f2376
commit 1e8e48d65b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -25,9 +25,16 @@ target_link_libraries (synergy shared)
if (WIN32)
include_directories ($ENV{BONJOUR_SDK_HOME}/Include)
find_library (DNSSD_LIB dnssd.lib
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
find_library (DNSSD_LIB dnssd.lib
HINTS ENV BONJOUR_SDK_HOME
PATH_SUFFIXES "Lib/x64")
else()
find_library (DNSSD_LIB dnssd.lib
HINTS ENV BONJOUR_SDK_HOME
PATH_SUFFIXES "Lib/Win32")
endif()
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries (synergy dns_sd)
endif()