summaryrefslogtreecommitdiff
path: root/cmd-line-utils/readline
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-line-utils/readline')
-rw-r--r--cmd-line-utils/readline/CMakeLists.txt60
-rw-r--r--cmd-line-utils/readline/Makefile.am2
2 files changed, 61 insertions, 1 deletions
diff --git a/cmd-line-utils/readline/CMakeLists.txt b/cmd-line-utils/readline/CMakeLists.txt
new file mode 100644
index 00000000000..506dc1a0ef6
--- /dev/null
+++ b/cmd-line-utils/readline/CMakeLists.txt
@@ -0,0 +1,60 @@
+# Copyright (C) 2007 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_SOURCE_DIR}/cmd-line-utils)
+
+ADD_DEFINITIONS(-DHAVE_CONFIG_H -DNO_KILL_INTR -DMYSQL_CLIENT_NO_THREADS)
+
+INCLUDE_DIRECTORIES(${CURSES_INCLUDE_PATH})
+
+ADD_LIBRARY(readline
+ readline.c
+ funmap.c
+ keymaps.c
+ vi_mode.c
+ parens.c
+ rltty.c
+ complete.c
+ bind.c
+ isearch.c
+ display.c
+ signals.c
+ util.c
+ kill.c
+ undo.c
+ macro.c
+ input.c
+ callback.c
+ terminal.c
+ xmalloc.c
+ history.c
+ histsearch.c
+ histexpand.c
+ histfile.c
+ nls.c
+ search.c
+ shell.c
+ tilde.c
+ misc.c
+ text.c
+ mbutil.c
+ compat.c
+ savestring.c
+)
+
+# Declare dependency
+# so every executable that links with readline links with curses as well
+TARGET_LINK_LIBRARIES(readline ${CURSES_LIBRARY})
diff --git a/cmd-line-utils/readline/Makefile.am b/cmd-line-utils/readline/Makefile.am
index e5f5717858d..d58ce0f1de1 100644
--- a/cmd-line-utils/readline/Makefile.am
+++ b/cmd-line-utils/readline/Makefile.am
@@ -29,7 +29,7 @@ noinst_HEADERS = readline.h chardefs.h keymaps.h \
tilde.h rlconf.h rltty.h ansi_stdlib.h \
tcap.h rlstdc.h
-EXTRA_DIST= emacs_keymap.c vi_keymap.c
+EXTRA_DIST= emacs_keymap.c vi_keymap.c CMakeLists.txt
DEFS = -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR