diff options
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}") |