From d6019ac689b043f6a786e0429a9bda07c0c3489c Mon Sep 17 00:00:00 2001 From: user Date: Sun, 26 Dec 2021 12:23:31 +0300 Subject: [PATCH] Do not force static runtime for boost unless building for win32 --- CMakeLists.txt | 2 ++ src/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dd80480..41f91db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,9 @@ set(CMAKE_CXX_FLAGS "/O2 /GR /EHsc") endif() set(Boost_USE_STATIC_LIBS ON) +if(WIN32) set(Boost_USE_STATIC_RUNTIME ON) +endif() find_package(Boost REQUIRED COMPONENTS atomic chrono filesystem program_options system thread) set(OPENSSL_USE_STATIC_LIBS ON) find_package(OpenSSL REQUIRED) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7d8f3c5..1940f5f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -39,7 +39,9 @@ endif() set(CMAKE_CXX_EXTENSIONS OFF) set(Boost_USE_STATIC_LIBS ON) +if(WIN32) set(Boost_USE_STATIC_RUNTIME ON) +endif() find_package(Boost REQUIRED COMPONENTS atomic chrono filesystem program_options system thread) set(OPENSSL_USE_STATIC_LIBS ON) find_package(OpenSSL REQUIRED) -- 1.7.1