0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-14 01:37:56 +08:00

find libsodium with cmake

This commit is contained in:
Frank 2014-05-08 23:51:34 +02:00
parent 2cdfa1fff3
commit 05ab9a848f
3 changed files with 5 additions and 3 deletions

View File

@ -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)

View File

@ -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

View File

@ -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