mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-23 15:11:01 -06:00
For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.5 where possible. Also, remove `cmake_minimum_required()` and `project()` calls from individual cases where they are handled by `CMakeLists.txt`.
16 lines
524 B
CMake
16 lines
524 B
CMake
find_package(PkgConfig REQUIRED)
|
|
pkg_check_modules(NCURSES QUIET ncurses)
|
|
|
|
if (NCURSES_FOUND)
|
|
foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR)
|
|
get_property(value
|
|
CACHE "NCURSES_${variable}"
|
|
PROPERTY VALUE)
|
|
if (NOT value STREQUAL NCURSES_${variable})
|
|
message(FATAL_ERROR "Failed to set cache entry for NCURSES_${variable}:\nexpected -->${value}<--\nreceived -->${NCURSES_${variable}}<--")
|
|
endif ()
|
|
endforeach ()
|
|
else ()
|
|
message(STATUS "skipping test; ncurses not found")
|
|
endif ()
|