From bd831ed0948a1e99f573f0056f2bee5d3b21009e Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Tue, 6 Nov 2018 18:33:43 +0100 Subject: FindBoost: Add system thread library to Boost_LIBRARIES Add the system thread library to Boost_LIBRARIES when the boost thread component has been found. The Boost::thread imported target already pulls in Threads::Threads. This changes does the same for projects using the Boost_LIBRARIES variable instead. --- Modules/FindBoost.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index e983941..0794a6f 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -2074,6 +2074,9 @@ if(Boost_FOUND) message (STATUS " ${COMPONENT}") endif() list(APPEND Boost_LIBRARIES ${Boost_${UPPERCOMPONENT}_LIBRARY}) + if(COMPONENT STREQUAL "thread") + list(APPEND Boost_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) + endif() endif() endforeach() else() -- cgit v0.12