From 1e3ccf3aa9fc55c87c1a840e94c1acb42bb0af65 Mon Sep 17 00:00:00 2001 From: wangwei <1261385937@qq.com> Date: Fri, 27 Oct 2023 11:38:46 +0800 Subject: [PATCH] fix link error with openssl(static) on windows --- tests/simple/CMakeLists.txt | 4 ++++ ut/CMakeLists.txt | 1 + 2 files changed, 5 insertions(+) diff --git a/tests/simple/CMakeLists.txt b/tests/simple/CMakeLists.txt index 3804fcec..a412edfd 100644 --- a/tests/simple/CMakeLists.txt +++ b/tests/simple/CMakeLists.txt @@ -6,3 +6,7 @@ ADD_EXECUTABLE (simple-test TARGET_LINK_LIBRARIES (simple-test clickhouse-cpp-lib ) + +IF (MSVC) + TARGET_LINK_LIBRARIES (simple-test Crypt32) +ENDIF() \ No newline at end of file diff --git a/ut/CMakeLists.txt b/ut/CMakeLists.txt index 6b395458..13ad51d8 100644 --- a/ut/CMakeLists.txt +++ b/ut/CMakeLists.txt @@ -43,4 +43,5 @@ TARGET_LINK_LIBRARIES (clickhouse-cpp-ut IF (MSVC) TARGET_COMPILE_OPTIONS(clickhouse-cpp-ut PRIVATE /bigobj) + TARGET_LINK_LIBRARIES (clickhouse-cpp-ut Crypt32) ENDIF()