Browse Source

Merge topic 'FindBoost-link-threads'

bd831ed094 FindBoost: Add system thread library to Boost_LIBRARIES

Acked-by: Kitware Robot <[email protected]>
Merge-request: !2570
Brad King 7 years ago
parent
commit
a027128400
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Modules/FindBoost.cmake

+ 3 - 0
Modules/FindBoost.cmake

@@ -2082,6 +2082,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()