summaryrefslogtreecommitdiff
path: root/cmake/FindCursesw.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindCursesw.cmake')
-rw-r--r--cmake/FindCursesw.cmake47
1 files changed, 0 insertions, 47 deletions
diff --git a/cmake/FindCursesw.cmake b/cmake/FindCursesw.cmake
deleted file mode 100644
index bff02cec..00000000
--- a/cmake/FindCursesw.cmake
+++ /dev/null
@@ -1,47 +0,0 @@
1# - Find the curses include file and library
2#
3# CURSES_INCLUDE_DIR - the Curses include directory
4# CURSES_LIBRARIES - The libraries needed to use Curses
5# CURSES_HAVE_WIDE_CHAR - true if wide char is available
6# NO_WIDECHAR - Input variable, if set, disable wide char
7# ------------------------------------------------------------------------
8
9
10find_library(CURSES_LIBRARY "curses")
11find_library(CURSESW_LIBRARY "cursesw")
12
13find_library(NCURSES_LIBRARY "ncurses")
14find_library(NCURSESW_LIBRARY "ncursesw")
15
16if(NOT NO_WIDECHAR AND (CURSESW_LIBRARY OR NCURSESW_LIBRARY))
17 message(STATUS "Found wide character support")
18 set(CURSES_HAVE_WIDE_CHAR TRUE)
19 if(NCURSESW_LIBRARY)
20 set(CURSES_LIBRARIES ${NCURSESW_LIBRARY})
21 else()
22 set(CURSES_LIBRARIES ${CURSESW_LIBRARY})
23 endif()
24else()
25 message(STATUS "Could not found wide character support")
26 if(NCURSES_LIBRARY)
27 set(CURSES_LIBRARIES ${NCURSES_LIBRARY})
28 else()
29 set(CURSES_LIBRARIES ${CURSES_LIBRARY})
30 endif()
31endif()
32
33
34# We use curses.h not ncurses.h so let's not care about that for now
35
36if(CURSES_HAVE_WIDE_CHAR)
37 find_path(CURSES_INCLUDE_PATH curses.h PATH_SUFFIXES ncursesw)
38else()
39 find_path(CURSES_INCLUDE_PATH curses.h PATH_SUFFIXES ncurses)
40endif()
41
42set(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH})
43
44include(FindPackageHandleStandardArgs)
45find_package_handle_standard_args(Cursesw DEFAULT_MSG CURSES_INCLUDE_DIR CURSES_LIBRARIES)
46
47