From a24b2f6fb1dc287546ba0283fa994d2acc68c7f9 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Tue, 21 Dec 2021 00:29:54 +0300 Subject: [PATCH] Windows-specific libraries --- CMakeLists.txt | 1 + src/CMakeLists.txt | 10 ++++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c012ea2..9846cf1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,6 +172,7 @@ list(APPEND ALL_LIBRARIES ${Boost_LIBRARIES} ixwebsocket OpenSSL::Crypto qrencod if (WIN32) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/qt/res/bitcoin-qt.rc bitcoin-qt.rc) list(APPEND ALL_SOURCES bitcoin-qt.rc) + list(APPEND ALL_LIBRARIES ws2_32 shlwapi mswsock ole32 oleaut32 uuid gdi32) endif() if (APPLE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0e78bf5..8138d86 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -88,6 +88,16 @@ set(generic_sources list(APPEND ALL_SOURCES ${generic_sources}) list(APPEND ALL_LIBRARIES ${Boost_LIBRARIES} ixwebsocket OpenSSL::Crypto) +# Windows-specific libraries +if (WIN32) + list(APPEND ALL_LIBRARIES ws2_32 mswsock) +endif() + +# Some systems need rt library +if (NOT WIN32 AND NOT APPLE) + list(APPEND ALL_LIBRARIES rt) +endif() + # Try various libdb library file extensions if (EXISTS ${BerkeleyDB_LIBS}/libdb_cxx.a) list(APPEND ALL_LIBRARIES ${BerkeleyDB_LIBS}/libdb_cxx.a) -- 1.7.1