--- scripts/CMakeLists.txt.orig	2017-04-30 11:09:31 UTC
+++ scripts/CMakeLists.txt
@@ -270,6 +270,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()
@@ -326,16 +328,11 @@ ELSE()
     ${CMAKE_CURRENT_BINARY_DIR}/mysql_config.pl ESCAPE_QUOTES @ONLY)
   # On Unix, most of the files end up in the bin directory
   SET(BIN_SCRIPTS
-    msql2mysql
-    mysql_config
     mysql_fix_extensions
     mysql_setpermission
     mysql_secure_installation
     mysql_zap
-    mysqlaccess
     mysql_convert_table_format
-    mysql_find_rows
-    mytop
     mysqlhotcopy
     mysqldumpslow
     mysqld_multi
