CMake: find YAMLCPP when asked to find Calamares

This commit is contained in:
Adriaan de Groot 2021-07-23 17:26:42 +02:00
parent 4b2b74bdbd
commit 604535f65a

View File

@ -27,6 +27,9 @@ if (NOT TARGET Calamares::calamares OR NOT TARGET Calamares::calamaresui)
message(FATAL_ERROR "Calamares found with missing CMake targets") message(FATAL_ERROR "Calamares found with missing CMake targets")
endif() endif()
# Need various CMake files that are installed alongside this one.
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
### Dependencies ### Dependencies
# #
# The libraries can depend on a variety of Qt and KDE Frameworks # The libraries can depend on a variety of Qt and KDE Frameworks
@ -60,6 +63,8 @@ if(kf5_required)
endif() endif()
endif() endif()
find_package(YAMLCPP REQUIRED)
### Legacy support ### Legacy support
# #
# #
@ -70,8 +75,6 @@ set(Calamares_LIBRARIES Calamares::calamares)
### CMake support ### CMake support
# #
# #
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
include(CalamaresAddBrandingSubdirectory) include(CalamaresAddBrandingSubdirectory)
include(CalamaresAddLibrary) include(CalamaresAddLibrary)
include(CalamaresAddModuleSubdirectory) include(CalamaresAddModuleSubdirectory)