Updates will be applied today, at 4 pm EDT (UTC-0400). No interruption, and site should remain available.

FindPkgConfig_cache_variables.cmake 561 Bytes
Newer Older
1 2
cmake_minimum_required(VERSION 3.3)

3 4 5 6 7
find_package(PkgConfig REQUIRED)
pkg_check_modules(NCURSES QUIET ncurses)

if (NCURSES_FOUND)
  foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR)
8
    get_property(value
9
      CACHE     "NCURSES_${variable}"
10 11 12
      PROPERTY  VALUE)
    if (NOT value STREQUAL NCURSES_${variable})
      message(FATAL_ERROR "Failed to set cache entry for NCURSES_${variable}:\nexpected -->${value}<--\nreceived -->${NCURSES_${variable}}<--")
13 14 15 16 17
    endif ()
  endforeach ()
else ()
  message(STATUS "skipping test; ncurses not found")
endif ()