--- scripts/CMakeLists.txt.orig	2015-06-17 14:54:12 UTC
+++ scripts/CMakeLists.txt
@@ -269,6 +269,8 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
             STRING(REGEX REPLACE "^lib" "" lib "${lib}")
             SET(${var} "${${var}}-l${lib} " ) 
           ENDIF()
+        ELSEIF(lib STREQUAL "-pthread")
+          SET(${var} "${${var}}-pthread " )
         ELSE()
           SET(${var} "${${var}}-l${lib} " ) 
         ENDIF()
