From 117b1dddc6af382df03bed291465d601e1068097 Mon Sep 17 00:00:00 2001 From: niansa/tuxifan Date: Sat, 21 Sep 2024 23:51:00 +0200 Subject: [PATCH] Do not attempt to link with `dl` on Windows --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 285e5a8..67fbdc9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,13 +30,17 @@ else() find_package(OpenSSL REQUIRED) endif() +if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows) + set(DL_LIBRARY dl) +endif() + target_include_directories(${BOT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${OPENSSL_INCLUDE_DIR} ) target_link_libraries(${BOT_NAME} - dl + ${DL_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY}