fixed: linux curl link error

This commit is contained in:
Nick Bolton 2014-02-05 17:49:43 +00:00
parent b8fc718b5a
commit 3aec1b01ca
2 changed files with 10 additions and 5 deletions

View File

@ -137,12 +137,17 @@ if (UNIX)
check_library_exists("pthread" pthread_create "" HAVE_PTHREAD) check_library_exists("pthread" pthread_create "" HAVE_PTHREAD)
if (HAVE_PTHREAD) if (HAVE_PTHREAD)
list(APPEND libs pthread) list(APPEND libs pthread)
else (HAVE_PTHREAD) else()
message(FATAL_ERROR "Missing library: pthread") message(FATAL_ERROR "Missing library: pthread")
endif() endif()
find_library(lib_CURL CURL) # curl is used on both Linux and Mac
list(APPEND libs ${lib_CURL}) find_package(CURL)
if (CURL_FOUND)
list(APPEND libs curl)
else()
message(FATAL_ERROR "Missing library: curl")
endif()
if (APPLE) if (APPLE)
exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION) exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION)

View File

@ -40,7 +40,7 @@ endif()
include_directories(${inc}) include_directories(${inc})
add_executable(syntool ${src}) add_executable(syntool ${src})
target_link_libraries(syntool 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) if (CONF_CPACK)
install(TARGETS install(TARGETS