From c7c14f02dd56499ebd049cc391dd14cf26e82911 Mon Sep 17 00:00:00 2001 From: coypu Date: Thu, 2 Aug 2018 15:39:59 +0300 Subject: [PATCH 1/3] Also add curl include directories. While here, use the variables from FindCURL.cmake --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c98e468b10a..f6f6aa72052 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,7 +132,9 @@ if (UNIX) # curl is used on both Linux and Mac find_package (CURL) if (CURL_FOUND) - list (APPEND libs curl) + include_directories(${CURL_INCLUDE_DIRS}) + list (APPEND libs ${CURL_LIBRARIES}) + else() message (FATAL_ERROR "Missing library: curl") endif() From 87820d9387559817051eed996c21e51cacaf5f1b Mon Sep 17 00:00:00 2001 From: coypu Date: Thu, 2 Aug 2018 15:41:02 +0300 Subject: [PATCH 2/3] have all other OSes handled in the else case. No reason to limit to just freebsd and linux, we handle all existing supported OSes in the previous cases. Needed for NetBSD support. --- src/gui/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 12fb5fda5ff..9eaa67e805c 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -36,8 +36,7 @@ if (WIN32) elseif (APPLE) find_library(APPSERVICES_LIB ApplicationServices) target_link_libraries(barrier ${APPSERVICES_LIB}) -elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR - ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") +else() target_link_libraries (barrier dns_sd) endif() From 443e656be25e3a5d433bc57813edc28831ff3e1a Mon Sep 17 00:00:00 2001 From: coypu Date: Thu, 2 Aug 2018 15:42:20 +0300 Subject: [PATCH 3/3] Use ${CMAKE_DL_LIBS} rather than listing OSes. CMake makes our lives easier. Needed for NetBSD, which also doesn't have libdl.so. --- src/lib/arch/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/arch/CMakeLists.txt b/src/lib/arch/CMakeLists.txt index 113cdd997c3..db92634e4fc 100644 --- a/src/lib/arch/CMakeLists.txt +++ b/src/lib/arch/CMakeLists.txt @@ -41,7 +41,5 @@ add_library(arch STATIC ${sources}) if (UNIX) target_link_libraries(arch ${libs}) - if (NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - target_link_libraries(arch dl) - endif() + target_link_libraries(arch ${CMAKE_DL_LIBS}) endif()