diff --git a/tdutils/CMakeLists.txt b/tdutils/CMakeLists.txt index 1312c1dae..fb5a22129 100644 --- a/tdutils/CMakeLists.txt +++ b/tdutils/CMakeLists.txt @@ -317,10 +317,12 @@ if (OPENSSL_FOUND) target_link_libraries(tdutils PRIVATE ${OPENSSL_CRYPTO_LIBRARY} ${CMAKE_DL_LIBS} ${ZLIB_LIBRARIES}) target_include_directories(tdutils SYSTEM PRIVATE ${OPENSSL_INCLUDE_DIR}) - if (MINGW) - target_link_libraries(tdutils PRIVATE ws2_32 mswsock crypt32) - else() - target_link_libraries(tdutils PRIVATE ws2_32 Mswsock Crypt32) + if (WIN32) + if (MINGW) + target_link_libraries(tdutils PRIVATE ws2_32 mswsock crypt32) + else() + target_link_libraries(tdutils PRIVATE ws2_32 Mswsock Crypt32) + endif() endif() endif()