diff options
author | tobtoht <tob@featherwallet.org> | 2024-02-24 16:25:42 +0100 |
---|---|---|
committer | tobtoht <tob@featherwallet.org> | 2024-02-24 16:26:43 +0100 |
commit | cdab0d489c8b12558655467d5544b60c1713737b (patch) | |
tree | a1c500269f7fa0ed811ae446274053741d15e488 /CMakeLists.txt | |
parent | depends: move sodium to packages (diff) | |
download | monero-cdab0d489c8b12558655467d5544b60c1713737b.tar.xz |
cmake: require libsodium
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 83d760c66..6ffdaeb55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1179,13 +1179,17 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND ARCH_WIDTH EQUAL "32" AND NOT IOS AND endif() endif() +if(STATIC) + set(sodium_USE_STATIC_LIBS ON) +endif() +find_package(Sodium REQUIRED) + find_path(ZMQ_INCLUDE_PATH zmq.h) find_library(ZMQ_LIB zmq) find_library(PGM_LIBRARY pgm) find_library(NORM_LIBRARY norm) find_library(GSSAPI_LIBRARY gssapi_krb5) find_library(PROTOLIB_LIBRARY protolib) -find_library(SODIUM_LIBRARY sodium) find_library(BSD_LIBRARY bsd) find_library(MD_LIBRARY md) find_library(PROTOKIT_LIBRARY protokit) @@ -1208,8 +1212,8 @@ endif() if(PROTOLIB_LIBRARY) set(ZMQ_LIB "${ZMQ_LIB};${PROTOLIB_LIBRARY}") endif() -if(SODIUM_LIBRARY) - set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}") +if(Sodium_FOUND) + set(ZMQ_LIB "${ZMQ_LIB};${sodium_LIBRARIES}") endif() if(BSD_LIBRARY) set(ZMQ_LIB "${ZMQ_LIB};${BSD_LIBRARY}") |