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 <alexandru.croitor@qt.io>
(cherry picked from commit 2f7a78cd7b3351bc7a1a209d0822769d111f246b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Joerg Bornemann 2022-08-17 13:22:40 +02:00 committed by Qt Cherry-pick Bot
parent cd5d212634
commit 487512c134

View File

@ -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()