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)