Fix linking with non-MSVC toolchain in Windows platform
This adds the link libraries in CMakeLists.txt file. If the libraries
are not in CMake files linking failed with undefined reference error.
Change-Id: I8f8352f6149a6332eedc0be51f36634890e3db60
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/54805
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
index b6f08b0..beb8bd8 100644
--- a/crypto/CMakeLists.txt
+++ b/crypto/CMakeLists.txt
@@ -470,6 +470,10 @@
SET_TARGET_PROPERTIES(crypto PROPERTIES LINKER_LANGUAGE C)
+if(WIN32)
+ target_link_libraries(crypto ws2_32)
+endif()
+
if(NOT ANDROID)
find_package(Threads REQUIRED)
target_link_libraries(crypto Threads::Threads)