aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-09-25 20:25:10 +0200
committerRiccardo Spagni <ric@spagni.net>2017-09-25 20:25:10 +0200
commit7b8398eed7556a1c818f3999cf2c09b67c881c7f (patch)
treee4728bc87b6fa96fcea710a53f32369c1a78e90c /CMakeLists.txt
parentMerge pull request #2525 (diff)
parentdaemon: fix static building with libzmq (diff)
downloadmonero-7b8398eed7556a1c818f3999cf2c09b67c881c7f.tar.xz
Merge pull request #2485
a3691ae3 daemon: fix static building with libzmq (iDunk5400)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 842eea734..1be0df305 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()
option(BUILD_TESTS "Build tests." OFF)