diff options
Diffstat (limited to 'cmake/FindCursesw.cmake')
-rw-r--r-- | cmake/FindCursesw.cmake | 47 |
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 | |||
10 | find_library(CURSES_LIBRARY "curses") | ||
11 | find_library(CURSESW_LIBRARY "cursesw") | ||
12 | |||
13 | find_library(NCURSES_LIBRARY "ncurses") | ||
14 | find_library(NCURSESW_LIBRARY "ncursesw") | ||
15 | |||
16 | if(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() | ||
24 | else() | ||
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() | ||
31 | endif() | ||
32 | |||
33 | |||
34 | # We use curses.h not ncurses.h so let's not care about that for now | ||
35 | |||
36 | if(CURSES_HAVE_WIDE_CHAR) | ||
37 | find_path(CURSES_INCLUDE_PATH curses.h PATH_SUFFIXES ncursesw) | ||
38 | else() | ||
39 | find_path(CURSES_INCLUDE_PATH curses.h PATH_SUFFIXES ncurses) | ||
40 | endif() | ||
41 | |||
42 | set(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH}) | ||
43 | |||
44 | include(FindPackageHandleStandardArgs) | ||
45 | find_package_handle_standard_args(Cursesw DEFAULT_MSG CURSES_INCLUDE_DIR CURSES_LIBRARIES) | ||
46 | |||
47 | |||