File fix-cmake-target-generator-for-sysroot.patch of Package cmake
--- a/Source/cmExportFileGenerator.cxx 2021-04-22 15:19:25.844345773 +0200
+++ b/Source/cmExportFileGenerator.cxx 2021-04-26 12:14:46.566045984 +0200
@@ -1167,7 +1167,7 @@
os << "# Loop over all imported files and verify that they actually exist\n"
"foreach(target ${_IMPORT_CHECK_TARGETS} )\n"
" foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )\n"
- " if(NOT EXISTS \"${file}\" )\n"
+ " if(NOT EXISTS \"${CMAKE_SYSROOT}${file}\" )\n"
" message(FATAL_ERROR \"The imported target \\\"${target}\\\""
" references the file\n"
" \\\"${file}\\\"\n"