CMake: target kpmcore doesn't exist elsewhere, so check was failing
Consumers of calapmcode couldn't tell if KPMcore was found. Pass it around as a property of calapmcore, rather than anything else. FIXES #2026
This commit is contained in:
parent
f42f2514cb
commit
0688c7f4e7
@ -34,13 +34,16 @@ if(NOT TARGET calapmcore)
|
||||
target_include_directories(calapmcore INTERFACE ${KPMCORE_INCLUDE_DIR})
|
||||
# If there were KPMcore API variations, figure them out here
|
||||
# target_compile_definitions(calapmcore INTERFACE WITH_KPMcore)
|
||||
set_target_properties(calapmcore PROPERTIES KPMcore_FOUND TRUE)
|
||||
else()
|
||||
target_compile_definitions(calapmcore INTERFACE WITHOUT_KPMcore)
|
||||
set_target_properties(calapmcore PROPERTIES KPMcore_FOUND FALSE)
|
||||
endif()
|
||||
|
||||
add_library(calamares::kpmcore ALIAS calapmcore)
|
||||
else()
|
||||
if(TARGET kpmcore)
|
||||
get_target_property(KPMcore_FOUND calapmcore KPMcore_FOUND)
|
||||
if(KPMcore_FOUND)
|
||||
message(STATUS "KPMcore has already been found")
|
||||
set(KPMcore_FOUND TRUE)
|
||||
else()
|
||||
|
Loading…
Reference in New Issue
Block a user