From 487512c134ab14b8fedd25943bfd7b1325bdbec5 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 17 Aug 2022 13:22:40 +0200 Subject: [PATCH] CMake: Allow for CMAKE_INSTALL_BINDIR set to . in deployment API Esp. on Windows, it can be desirable to deploy an application and its DLLs directly in the install prefix, without a bin directory. To do that, one must set CMAKE_INSTALL_BINDIR to ".", but that resulted in a faulty prefix entry in the generated qt.conf. Check for this case when generating qt.conf to write the correct prefix. Fixes: QTBUG-105583 Change-Id: I0e8295c70b48b991c19f58f6b3f2ed132112dd29 Reviewed-by: Alexandru Croitor (cherry picked from commit 2f7a78cd7b3351bc7a1a209d0822769d111f246b) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/Qt6CoreDeploySupport.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/Qt6CoreDeploySupport.cmake b/src/corelib/Qt6CoreDeploySupport.cmake index a9d2dfe9558..c6336d0882c 100644 --- a/src/corelib/Qt6CoreDeploySupport.cmake +++ b/src/corelib/Qt6CoreDeploySupport.cmake @@ -171,7 +171,7 @@ function(qt6_deploy_runtime_dependencies) endif() elseif(arg_GENERATE_QT_CONF) get_filename_component(exe_dir "${arg_EXECUTABLE}" DIRECTORY) - if(exe_dir STREQUAL "") + if(exe_dir STREQUAL "" OR exe_dir STREQUAL ".") set(exe_dir ".") set(prefix ".") else()