From b5788d4b1704d5a595847cb4eeb2e3eaa4d68ff6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 22 Mar 2021 13:18:41 +0100 Subject: [PATCH] CMake: be more verbose on developer machines This change is relevant only if you build Calamares and some out-of-tree modules (e.g. calamares-extensions) on the same machine where CMake caches files in the developer's ~/.cmake/packages . If the user packages registry kicks in the include files won't be found, and the targets are not defined. --- CalamaresConfig.cmake.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CalamaresConfig.cmake.in b/CalamaresConfig.cmake.in index fdb3c2038..f10fda11a 100644 --- a/CalamaresConfig.cmake.in +++ b/CalamaresConfig.cmake.in @@ -23,6 +23,9 @@ # include(${CMAKE_CURRENT_LIST_DIR}/CalamaresConfigVersion.cmake) include(${CMAKE_CURRENT_LIST_DIR}/CalamaresTargets.cmake) +if (NOT TARGET Calamares::calamares OR NOT TARGET Calamares::calamaresui) + message(FATAL_ERROR "Calamares found with missing CMake targets") +endif() ### Dependencies #