From 3aec1b01cae61d69f5718a55257321154c076352 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Wed, 5 Feb 2014 17:49:43 +0000 Subject: [PATCH] fixed: linux curl link error --- CMakeLists.txt | 13 +++++++++---- src/cmd/syntool/CMakeLists.txt | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 87fe4de3..1553585e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,12 +137,17 @@ if (UNIX) check_library_exists("pthread" pthread_create "" HAVE_PTHREAD) if (HAVE_PTHREAD) list(APPEND libs pthread) - else (HAVE_PTHREAD) + else() message(FATAL_ERROR "Missing library: pthread") endif() - - find_library(lib_CURL CURL) - list(APPEND libs ${lib_CURL}) + + # curl is used on both Linux and Mac + find_package(CURL) + if (CURL_FOUND) + list(APPEND libs curl) + else() + message(FATAL_ERROR "Missing library: curl") + endif() if (APPLE) exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION) diff --git a/src/cmd/syntool/CMakeLists.txt b/src/cmd/syntool/CMakeLists.txt index 709d48fa..5a2af4d7 100644 --- a/src/cmd/syntool/CMakeLists.txt +++ b/src/cmd/syntool/CMakeLists.txt @@ -40,7 +40,7 @@ endif() include_directories(${inc}) add_executable(syntool ${src}) target_link_libraries(syntool - arch base client common io mt net ipc platform synergy cryptopp ${libs}) + synergy arch base client common io ipc mt net platform server cryptopp ${libs}) if (CONF_CPACK) install(TARGETS