diff -Naur a/client/CMakeLists.txt b/client/CMakeLists.txt
--- a/client/CMakeLists.txt	2016-03-28 11:06:12.000000000 -0700
+++ b/client/CMakeLists.txt	2016-05-19 02:34:38.828457442 -0700
@@ -44,7 +44,7 @@
 MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc ../sql-common/sql_string.cc)
 TARGET_LINK_LIBRARIES(mysql mysqlclient)
 IF(UNIX)
-  TARGET_LINK_LIBRARIES(mysql ${EDITLINE_LIBRARY})
+  TARGET_LINK_LIBRARIES(mysql ${EDITLINE_LIBRARY} termcap)
 ENDIF(UNIX)
 
 IF(NOT WITHOUT_SERVER)
