Commit 05ab9a84 authored by Frank's avatar Frank

find libsodium with cmake

parent 2cdfa1ff
......@@ -29,6 +29,8 @@ if(WITH_TWEETNACL)
else()
list(APPEND TWEETNACL_SOURCES tweetnacl/contrib/randombytes/devurandom.c)
endif()
else()
find_library(SODIUM_FOUND sodium)
endif()
......@@ -610,7 +612,7 @@ else()
endif()
endif()
target_link_libraries(libzmq ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(libzmq ${SODIUM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
if(HAVE_WS2_32)
target_link_libraries(libzmq ws2_32)
elseif(HAVE_WS2)
......
......@@ -46,7 +46,7 @@ zmq::curve_client_t::curve_client_t (const options_t &options_) :
randombytes(tmpbytes, 4);
#else
const int si = sodium_init();
zmq_assert (is == 0);
zmq_assert (si == 0);
#endif
// Generate short-term key pair
......
......@@ -51,7 +51,7 @@ zmq::curve_server_t::curve_server_t (session_base_t *session_,
randombytes(tmpbytes, 4);
#else
const int si = sodium_init();
zmq_assert (is == 0);
zmq_assert (si == 0);
#endif
// Generate short-term key pair
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment