summaryrefslogtreecommitdiffstats
path: root/FindReadline.cmake
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-05-19 09:13:35 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-05-19 09:13:35 +0200
commitbadc0da3b74d99c90b7b28180d08cd6d08830254 (patch)
treebf4acef89fd445b0e406c0bebbf60fc7ff467fce /FindReadline.cmake
parent1cfbc7298525656701f32224e1ed42a3e835835a (diff)
downloadmad-badc0da3b74d99c90b7b28180d08cd6d08830254.tar
mad-badc0da3b74d99c90b7b28180d08cd6d08830254.zip
Make-Prozess auf CMake umgestellt
Diffstat (limited to 'FindReadline.cmake')
-rw-r--r--FindReadline.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/FindReadline.cmake b/FindReadline.cmake
new file mode 100644
index 0000000..74dc302
--- /dev/null
+++ b/FindReadline.cmake
@@ -0,0 +1,17 @@
+FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h)
+FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
+
+IF (READLINE_INCLUDE_DIR AND READLINE_LIBRARY)
+ SET(READLINE_FOUND TRUE)
+ENDIF (READLINE_INCLUDE_DIR AND READLINE_LIBRARY)
+
+IF (READLINE_FOUND)
+ IF (NOT Readline_FIND_QUIETLY)
+ MESSAGE(STATUS "Found GNU readline: ${READLINE_LIBRARY}")
+ ENDIF (NOT Readline_FIND_QUIETLY)
+ELSE (READLINE_FOUND)
+ IF (Readline_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find GNU readline")
+ ENDIF (Readline_FIND_REQUIRED)
+ENDIF (READLINE_FOUND)
+