aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriDunk5400 <iDunk5400@users.noreply.github.com>2017-09-20 01:47:24 +0200
committeriDunk5400 <iDunk5400@users.noreply.github.com>2017-09-23 12:34:02 +0200
commita3691ae31c791a3fddb32b539918821a7ab5277d (patch)
treef53ee627280eb250a148f3025b3dd67478e7a43a
parentMerge pull request #2446 (diff)
downloadmonero-a3691ae31c791a3fddb32b539918821a7ab5277d.tar.xz
daemon: fix static building with libzmq
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 971c097ff..d50391ba2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -234,6 +234,7 @@ if(STATIC)
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
endif()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DZMQ_STATIC")
endif()
# Set default blockchain storage location:
@@ -691,12 +692,16 @@ include(version.cmake)
find_path(ZMQ_INCLUDE_PATH zmq.hpp)
find_library(ZMQ_LIB zmq)
+find_library(SODIUM_LIBRARY sodium)
if(NOT ZMQ_INCLUDE_PATH)
message(FATAL_ERROR "Could not find required header zmq.hpp")
endif()
if(NOT ZMQ_LIB)
- message(FATAL_ERROR "Could not find require libzmq")
+ message(FATAL_ERROR "Could not find required libzmq")
+endif()
+if(SODIUM_LIBRARY)
+ set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}")
endif()
function (treat_warnings_as_errors dirs)