CMake: repair broken logic around finding KPMcore

- the alias libraries calapmcore and calamares::kpmcore
  are always created; if there is no KPMcore, they handle
  definitions to signal that.
- upstream kpmcore target is the one we should be testing
  to see if KPMcore itself is there (or, use KPMcore_FOUND).
This commit is contained in:
Adriaan de Groot 2022-07-19 11:54:26 +02:00
parent 97cbebc0f7
commit 908928b41c

View File

@ -45,7 +45,7 @@ if(NOT KPMcore_searched_for AND NOT TARGET calapmcore)
add_library(calamares::kpmcore ALIAS calapmcore)
else()
if(TARGET calapmcore)
if(TARGET kpmcore)
message(STATUS "KPMcore has already been found")
set(KPMcore_FOUND TRUE)
else()