From 4d16c77f73949ca24bb729e66e93b4fa4b68a15e Mon Sep 17 00:00:00 2001 From: SChernykh Date: Mon, 23 Aug 2021 14:48:53 +0200 Subject: [PATCH] Fixes for MacOS build --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db0ad15..e80e1be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,7 @@ include_directories(external/src/randomx/src) if (WIN32) set(LIBS ${LIBS} ws2_32 iphlpapi userenv psapi) -else() +elseif (NOT APPLE) set(LIBS ${LIBS} pthread gss dl) endif() @@ -89,7 +89,7 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang find_library(ZMQ_LIBRARY NAMES libzmq libzmq.a) find_library(UV_LIBRARY_DEBUG NAMES libuv libuv.a) find_library(UV_LIBRARY NAMES libuv libuv.a) - set(LIBS ${LIBS} sodium) + find_library(SODIUM_LIBRARY sodium) endif() find_library(PGM_LIBRARY pgm) @@ -103,6 +103,10 @@ if (NORM_LIBRARY) set(LIBS ${LIBS} ${NORM_LIBRARY}) endif() +if (SODIUM_LIBRARY) + set(LIBS ${LIBS} ${SODIUM_LIBRARY}) +endif() + add_definitions(/DZMQ_STATIC) add_executable(${CMAKE_PROJECT_NAME} ${HEADERS} ${SOURCES})