--- scripts/CMakeLists.txt.orig	2014-04-15 14:02:28.000000000 +0300
+++ scripts/CMakeLists.txt	2014-05-16 19:36:34.000000000 +0300
@@ -276,6 +276,8 @@
             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()
@@ -332,16 +334,11 @@
     ${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
