Merge branch 'fix-repeat-pkg-config' into release
This commit is contained in:
commit
2c3b8a1cd8
|
@ -383,7 +383,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
|
|||
pkg_get_variable("${_pkg_check_prefix}_INCLUDEDIR" ${_pkg_check_modules_pkg} "includedir")
|
||||
pkg_get_variable("${_pkg_check_prefix}_LIBDIR" ${_pkg_check_modules_pkg} "libdir")
|
||||
foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR)
|
||||
_pkgconfig_set("${_pkg_check_modules_pkg}_${variable}" "${${_pkg_check_modules_pkg}_${variable}}")
|
||||
_pkgconfig_set("${_pkg_check_prefix}_${variable}" "${${_pkg_check_prefix}_${variable}}")
|
||||
endforeach ()
|
||||
|
||||
if (NOT ${_is_silent})
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
cmake_minimum_required(VERSION 3.3)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(NCURSES QUIET ncurses)
|
||||
|
||||
if (NCURSES_FOUND)
|
||||
foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR)
|
||||
get_property("${variable}"
|
||||
get_property(value
|
||||
CACHE "NCURSES_${variable}"
|
||||
PROPERTY TYPE
|
||||
SET)
|
||||
if (NOT ${variable})
|
||||
message(FATAL_ERROR "Failed to set cache entry for 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 ()
|
||||
|
|
Loading…
Reference in New Issue