Open nickdademo opened 3 months ago
Thanks for posting this issue. I checked the configure log of qtbase
, and macro CMAKE_BUILD_TYPE
was passed correctly as below. There is no issue with patch fix_deploy_windows.patch
.
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_BUILD_TYPE=Debug"
Thanks for posting this issue. I checked the configure log of
qtbase
, and macroCMAKE_BUILD_TYPE
was passed correctly as below. There is no issue with patchfix_deploy_windows.patch
."-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_BUILD_TYPE=Debug"
Which log exactly? Was this a command line build? Did you try with Visual Studio IDE?
The config-x64-windows-out.log
of qtbase
, there are macros "-DCMAKE_BUILD_TYPE=Release"
and "-DCMAKE_BUILD_TYPE=Debug"
in cmake.exe
command.
The
config-x64-windows-out.log
ofqtbase
, there are macros"-DCMAKE_BUILD_TYPE=Release"
and"-DCMAKE_BUILD_TYPE=Debug"
incmake.exe
command.
@LilyWangLL you are asking details about building Qt. But the issue is about using Qt with multi-config generators.
The
config-x64-windows-out.log
ofqtbase
, there are macros"-DCMAKE_BUILD_TYPE=Release"
and"-DCMAKE_BUILD_TYPE=Debug"
incmake.exe
command.
CMake correctly generates all the required files for each config; the problem is during executing these CMake deployment functions/macros during build (as @dg0yt mentioned).
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.
Describe the bug For multi-configs builds such as with Visual Studio, the CMake deployment support macros do not work correctly in Debug config.
Environment
To Reproduce Steps to reproduce the behavior:
Cause/Investigation In Debug config, the CMake deployment support functions are looking for the Qt binaries in the wrong location (
bin
instead ofdebug/bin
). This is due to CMake not choosing the correctqtpaths
executable:qtpaths.debug.bat
should be used, butqtpaths6.exe
is incorrectly used.The changes introduced by the
fix_deploy_windows.patch
port patch are not working as intended for multi-config builds. This is because theCMAKE_BUILD_TYPE STREQUAL "Debug"
condition added by the patch is evaluated during CMake configure and will not be correct if CMAKE_BUILD_TYPE is not explicitly set to Debug.Workaround Workaround is hacky and is to manually clear the internal CMake var which points to the incorrect
qtpaths
tool. We then rely onqtpaths.debug.bat
to provide the correct path to the tool (which it does).QML projects:
or non-QML projects: