From 5668bda3338c0291f0b26277245b9c022ad2e8bd Mon Sep 17 00:00:00 2001 From: MarkusTeufelberger Date: Sat, 2 Dec 2017 22:47:12 +0100 Subject: [PATCH] Link boost statically only when requested Fixes #2261 --- Builds/CMake/CMakeFuncs.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Builds/CMake/CMakeFuncs.cmake b/Builds/CMake/CMakeFuncs.cmake index dbef6111c7e..7ddcaef4e86 100644 --- a/Builds/CMake/CMakeFuncs.cmake +++ b/Builds/CMake/CMakeFuncs.cmake @@ -337,7 +337,10 @@ macro(use_boost) set(BOOST_ROOT $ENV{CLANG_BOOST_ROOT}) endif() - set(Boost_USE_STATIC_LIBS on) + + if (static) + set(Boost_USE_STATIC_LIBS on) + endif() set(Boost_USE_MULTITHREADED on) set(Boost_USE_STATIC_RUNTIME off) if(MSVC)