From 1e8e48d65babfbc4065486a37ae8e3a7a6fe4f5e Mon Sep 17 00:00:00 2001 From: "Jerry (Xinyu Hou)" Date: Tue, 20 Mar 2018 11:41:38 +0000 Subject: [PATCH] Use corresponding Bonjour libs for different versions of OS --- src/gui/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index afb80c07..54cafabc 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -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()