Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.4.1
-
None
-
Windows 7 Pro, x64, Qt 5.4.1 precompiled, Qt 4.8.6 precompiled
-
f90c1860580bcbe6b898ceb86cdd746532470c64
Description
qmake auto generates windows rc files if the VERSION variable is set.
For a simple QtCreator generated .pro file:
#------------------------------------------------- # # Project created by QtCreator 2015-03-17T11:49:27 # #------------------------------------------------- QT += core QT -= gui TARGET = resource_generation_buggy CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp VERSION = 1.2.3.4 # this was added by hand
using
qmake -tp vc
an vcxproj file for Visual Studio (or msbuild) is generated, that uses the autogenerated file with the windows resource compiler:
resource_generation_buggy_resource.rc
This works.
However it does fail, if you use the documented differentiation for the TARGET for release and debug:
build_pass:CONFIG(debug, debug|release) { unix: TARGET = $$join(TARGET,,,_debug) else: TARGET = $$join(TARGET,,,d) }
Calling qmake again will result in two rc files:
resource_generation_buggy_resource.rc resource_generation_buggyd_resource.rc
But the files are not compiled during the build process in VS2010.
If you have a closer look at the outcome of the vcxproj file with the renamed debug target you can see the entries:
<ItemGroup> <None Include="C:\temp\Qt_Bugs\ResourcesNotFound\resource_generation_buggy\resource_generation_buggy_resource.rc"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> </None> <None Include="C:\temp\Qt_Bugs\ResourcesNotFound\resource_generation_buggy\resource_generation_buggyd_resource.rc"> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> </None> </ItemGroup>
While in the file without the renamed debug target you can see just one resource file:
<ItemGroup> <ResourceCompile Include="C:\temp\Qt_Bugs\ResourcesNotFound\resource_generation_buggy\resource_generation_buggy_resource.rc" /> </ItemGroup>
The obvious difference is the tag <ResourceCompile> in the non debug differentiation version,
while in the debug version your have the tag: <None>
This is a regression against Qt 4.8.6 where the auto-generation of the debug version works
Please find attached some files to reproduce the problem.
Attachments
Issue Links
- relates to
-
QTBUG-44413 [REG 5.3->5.4] qmake VS2013 project files generation with Flat mode is broken
- Closed