From be611c26c855d10aa728c61e6fac9c6cec473bb3 Mon Sep 17 00:00:00 2001 From: Jeffrey Hsu Date: Mon, 9 Sep 2024 07:51:20 +0800 Subject: [PATCH] static link libpthread on win32 --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d0567f8..b286c19 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,9 +28,15 @@ if (ENABLE_ASAN) message("asan is on. if have any problems, disable it.") endif () +if (WIN32) + add_link_options( + -static + ) +endif () + # For CURL set(BUILD_STATIC_LIBS ON) -if(WIN32) +if (WIN32) set(CURL_USE_SCHANNEL ON) endif ()