Go with ncursesw if found

It'd be better if the user could choose the exact library, however this
change is actually necessary to support compilation on systems with
only the wide version's headers installed (hello Debian).
This commit is contained in:
Přemysl Eric Janouch 2014-11-30 00:36:41 +01:00
parent e8b9c654af
commit af193ef483

View File

@ -26,6 +26,7 @@ set (project_CMAKE_NAME "Termo")
find_package (Curses)
find_package (PkgConfig REQUIRED)
pkg_check_modules (glib glib-2.0 gio-2.0)
pkg_check_modules (ncursesw ncursesw)
pkg_check_modules (unibilium unibilium>=0.1.0)
# Header files with configuration
@ -48,6 +49,9 @@ if (unibilium_FOUND)
include_directories (${unibilium_INCLUDE_DIRS})
set (lib_libraries ${unibilium_LIBRARIES})
add_definitions (-DHAVE_UNIBILIUM)
elseif (ncursesw_FOUND)
include_directories (${ncursesw_INCLUDE_DIRS})
set (lib_libraries ${ncursesw_LIBRARIES})
elseif (CURSES_FOUND)
include_directories (${CURSES_INCLUDE_DIR})
set (lib_libraries ${CURSES_LIBRARY})