2016-03-18 22:48:56 +03:00
|
|
|
cmake_minimum_required(VERSION 3.3)
|
|
|
|
|
2016-01-20 22:38:05 +03:00
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_check_modules(NCURSES QUIET ncurses)
|
|
|
|
|
|
|
|
if (NCURSES_FOUND)
|
|
|
|
foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR)
|
2016-03-18 22:48:56 +03:00
|
|
|
get_property(value
|
2016-01-20 22:38:05 +03:00
|
|
|
CACHE "NCURSES_${variable}"
|
2016-03-18 22:48:56 +03:00
|
|
|
PROPERTY VALUE)
|
|
|
|
if (NOT value STREQUAL NCURSES_${variable})
|
|
|
|
message(FATAL_ERROR "Failed to set cache entry for NCURSES_${variable}:\nexpected -->${value}<--\nreceived -->${NCURSES_${variable}}<--")
|
2016-01-20 22:38:05 +03:00
|
|
|
endif ()
|
|
|
|
endforeach ()
|
|
|
|
else ()
|
|
|
|
message(STATUS "skipping test; ncurses not found")
|
|
|
|
endif ()
|