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
Pick-to: 6.3 6.4
Change-Id: I0e8295c70b48b991c19f58f6b3f2ed132112dd29
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2022-08-17 13:22:40 +02:00
parent f350956548
commit 2f7a78cd7b

View File

@ -174,7 +174,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()