summaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorAaron Seigo <aseigo@kde.org>2015-12-23 10:47:32 +0100
committerAaron Seigo <aseigo@kde.org>2015-12-23 10:47:32 +0100
commit255d73af197faf8437343abc10bd98cca2057a1e (patch)
treef16bdbdda08a450235230781eec558303c6442a1 /cmake/modules
parentb259728a4f63e022526ef86e6b5d6c62d9938d13 (diff)
downloadsink-255d73af197faf8437343abc10bd98cca2057a1e.tar.gz
sink-255d73af197faf8437343abc10bd98cca2057a1e.zip
initial import of the new cli app
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/FindReadline.cmake47
1 files changed, 47 insertions, 0 deletions
diff --git a/cmake/modules/FindReadline.cmake b/cmake/modules/FindReadline.cmake
new file mode 100644
index 0000000..883ad3f
--- /dev/null
+++ b/cmake/modules/FindReadline.cmake
@@ -0,0 +1,47 @@
1# - Try to find readline include dirs and libraries
2#
3# Usage of this module as follows:
4#
5# find_package(Readline)
6#
7# Variables used by this module, they can change the default behaviour and need
8# to be set before calling find_package:
9#
10# Readline_ROOT_DIR Set this variable to the root installation of
11# readline if the module has problems finding the
12# proper installation path.
13#
14# Variables defined by this module:
15#
16# READLINE_FOUND System has readline, include and lib dirs found
17# Readline_INCLUDE_DIR The readline include directories.
18# Readline_LIBRARY The readline library.
19
20find_path(Readline_ROOT_DIR
21 NAMES include/readline/readline.h
22 )
23
24find_path(Readline_INCLUDE_DIR
25 NAMES readline/readline.h
26 HINTS ${Readline_ROOT_DIR}/include
27 )
28
29find_library(Readline_LIBRARY
30 NAMES readline
31 HINTS ${Readline_ROOT_DIR}/lib
32 )
33
34if(Readline_INCLUDE_DIR AND Readline_LIBRARY AND Ncurses_LIBRARY)
35 set(READLINE_FOUND TRUE)
36else(Readline_INCLUDE_DIR AND Readline_LIBRARY AND Ncurses_LIBRARY)
37 FIND_LIBRARY(Readline_LIBRARY NAMES readline)
38 include(FindPackageHandleStandardArgs)
39 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG Readline_INCLUDE_DIR Readline_LIBRARY )
40 MARK_AS_ADVANCED(Readline_INCLUDE_DIR Readline_LIBRARY)
41endif(Readline_INCLUDE_DIR AND Readline_LIBRARY AND Ncurses_LIBRARY)
42
43mark_as_advanced(
44 Readline_ROOT_DIR
45 Readline_INCLUDE_DIR
46 Readline_LIBRARY
47 )