From 9a799294f77b2d0d735fa07246337e580460f0c7 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Mon, 21 Jul 2025 07:39:09 -0400 Subject: [PATCH] build: fail sooner on windows / mac if unable to find Qt deploy tool --- cmake/Libraries.cmake | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cmake/Libraries.cmake b/cmake/Libraries.cmake index f76da2417..9cf5d4d57 100644 --- a/cmake/Libraries.cmake +++ b/cmake/Libraries.cmake @@ -27,12 +27,20 @@ macro(configure_libs) # Define the location of Qt deployment tool if(WIN32) if (CMAKE_BUILD_TYPE STREQUAL "Debug" AND VCPKG_QT) - find_program(DEPLOYQT windeployqt.debug.bat) + set(DEPLOY_TOOL windeployqt.debug.bat) else() - find_program(DEPLOYQT windeployqt) + set(DEPLOY_TOOL windeployqt) endif() elseif(APPLE) - find_program(DEPLOYQT macdeployqt) + set(DEPLOY_TOOL macdeployqt) + endif() + + if (WIN32 OR APPLE) + find_program(DEPLOYQT ${DEPLOY_TOOL}) + if(DEPLOYQT STREQUAL "DEPLOYQT-NOTFOUND") + message(FATAL_ERROR "Unable to locate the Qt Deploy Tool: \"${DEPLOY_TOOL}\".") + endif() + unset(DEPLOY_TOOL) endif() set(CMAKE_AUTOMOC ON)