aboutsummaryrefslogtreecommitdiff
path: root/src/common/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/CMakeLists.txt')
-rw-r--r--src/common/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index b712ee6b1..2670182e3 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -67,6 +67,10 @@ monero_add_library(common
${common_headers}
${common_private_headers}
DEPENDS generate_translations_header)
+if(STATIC AND NOT MINGW)
+ find_package(ZLIB REQUIRED)
+ find_library(ZSTD_LIBRARY NAMES zstd REQUIRED)
+endif()
target_link_libraries(common
PUBLIC
cncrypto
@@ -80,7 +84,9 @@ target_link_libraries(common
${Boost_CHRONO_LIBRARY}
PRIVATE
${OPENSSL_LIBRARIES}
- ${EXTRA_LIBRARIES})
+ ${EXTRA_LIBRARIES}
+ $<$<AND:$<BOOL:${STATIC}>,$<NOT:$<BOOL:${MINGW}>>>:ZLIB::ZLIB>
+ $<$<AND:$<BOOL:${STATIC}>,$<NOT:$<BOOL:${MINGW}>>>:${ZSTD_LIBRARY}>)
#monero_install_headers(common
# ${common_headers})