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.
This commit is contained in:
Felix Geyer
2018-11-06 18:33:43 +01:00
committed by Brad King
parent 8d70ed5a10
commit bd831ed094

View File

@@ -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()