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:
parent
2cdfa1fff3
commit
05ab9a848f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user