diff --git a/CMakeLists.txt b/CMakeLists.txt index c98e468b..f6f6aa72 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() diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 12fb5fda..9eaa67e8 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() diff --git a/src/lib/arch/CMakeLists.txt b/src/lib/arch/CMakeLists.txt index 113cdd99..db92634e 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()