--- scripts/CMakeLists.txt.orig	2010-12-03 18:58:26.000000000 +0100
+++ scripts/CMakeLists.txt	2011-01-11 20:18:07.000000000 +0100
@@ -71,6 +71,7 @@
 )
 ENDIF()
 
+IF(FALSE)
 INSTALL(FILES 
   ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables.sql 
   ${CMAKE_CURRENT_SOURCE_DIR}/mysql_system_tables_data.sql
@@ -79,6 +80,7 @@
   ${FIX_PRIVILEGES_SQL}
   DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server
 )
+ENDIF()
 
 # TCMalloc hacks
 IF(MALLOC_LIB)
@@ -138,6 +140,7 @@
 SET(HOSTNAME "hostname")
 SET(MYSQLD_USER "mysql")
 
+IF(FALSE)
 # Required for mysqlbug until autotools are deprecated, once done remove these
 # and expand default cmake variables
 SET(CC ${CMAKE_C_COMPILER})
@@ -174,6 +177,7 @@
   DESTINATION ${INSTALL_BINDIR}
   COMPONENT Server
   )
+ENDIF()
 
 ENDIF(UNIX)
 
@@ -198,6 +202,7 @@
   SET(localstatedir ${MYSQL_DATADIR})
 ENDIF()
 
+IF()
 IF(UNIX)
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh
   ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY)
@@ -215,6 +220,7 @@
   DESTINATION ${DEST}
   COMPONENT Server
   )
+ENDIF()
 
 
 SET(prefix "${CMAKE_INSTALL_PREFIX}")
@@ -266,6 +272,8 @@
           GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE)
           STRING(REGEX REPLACE "^lib" "" lib "${lib}")
           SET(${var} "${${var}}-l${lib} " ) 
+        ELSEIF(lib STREQUAL "-pthread")
+          SET(${var} "${${var}}-pthread " ) 
         ELSE()
           SET(${var} "${${var}}-l${lib} " ) 
         ENDIF()
@@ -318,18 +326,9 @@
   SET(BIN_SCRIPTS
     msql2mysql
     mysql_config
-    mysql_fix_extensions
-    mysql_setpermission
-    mysql_secure_installation
-    mysql_zap
     mysqlaccess
     mysqlaccess.conf
-    mysql_convert_table_format
     mysql_find_rows
-    mysqlhotcopy
-    mysqldumpslow
-    mysqld_multi
-    mysqld_safe
   )
   FOREACH(file ${BIN_SCRIPTS})
     IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh)
