$OpenBSD: patch-Modules_FindBoost_cmake,v 1.10 2016/04/29 10:34:33 dcoppa Exp $
--- Modules/FindBoost.cmake.orig	Fri Apr 15 15:41:20 2016
+++ Modules/FindBoost.cmake	Wed Apr 27 10:55:08 2016
@@ -782,6 +782,22 @@ function(_Boost_MISSING_DEPENDENCIES componentvar extr
   set(${extravar} ${_boost_extra_components} PARENT_SCOPE)
 endfunction()
 
+function(_Boost_consider_adding_pthread _outvar)
+  # On Unix platforms (excluding Cygwin) add pthread to Boost_LIBRARIES
+  # if the user is searching for the boost-thread component.
+  if(UNIX AND NOT CYGWIN)
+    list(FIND Boost_FIND_COMPONENTS thread _using_boost_thread)
+    if(_using_boost_thread GREATER -1)
+      set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+      set(THREADS_PREFER_PTHREAD_FLAG TRUE)
+      find_package(Threads)
+      if(Threads_FOUND)
+        set(${_outvar} ${ARGN} Threads::Threads PARENT_SCOPE)
+      endif()
+    endif()
+  endif()
+endfunction()
+
 #
 # End functions/macros
 #
@@ -1652,6 +1668,8 @@ if(Boost_FOUND)
       list(APPEND Boost_LIBRARIES ${Boost_${UPPERCOMPONENT}_LIBRARY})
     endif()
   endforeach()
+  # Add pthread library if thread component was found
+  _Boost_consider_adding_pthread(Boost_LIBRARIES ${Boost_LIBRARIES})
 else()
   if(Boost_FIND_REQUIRED)
     message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}")
