Last active
June 12, 2022 02:38
-
-
Save Tvangeste/6249841 to your computer and use it in GitHub Desktop.
Dependencies for qrc files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<AdditionalDependencies Condition="'%(QtRCCCompile.AdditionalDependencies)' == ''">$(QTDIR)\bin\rcc.exe;$(MSBuildProjectFile)</AdditionalDependencies> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Target Name="CalculateQtRCCDeps" | |
DependsOnTargets="SelectQtRCCCompile" | |
Outputs="%(QtRCCCompile.Identity)"> | |
<Message Text="Calculating dependencies for %(QtRCCCompile.Identity)" /> | |
<!-- Look into the qrc file and fetch all the referenced files --> | |
<XmlPeek XmlInputPath="%(QtRCCCompile.FullPath)" | |
Query="//file/text()"> | |
<Output TaskParameter="Result" ItemName="QtRCCDeps" /> | |
</XmlPeek> | |
<!-- Add the calculated dependencies to the AdditionalDependencies --> | |
<ItemGroup> | |
<QtRCCCompile> | |
<AdditionalDependencies>@(QtRCCDeps);%(QtRCCCompile.AdditionalDependencies)</AdditionalDependencies> | |
</QtRCCCompile> | |
</ItemGroup> | |
<Message Text="Actual Dependencies: @(QtRCCCompile->'%(AdditionalDependencies)')" /> | |
</Target> | |
<Target | |
Name="QtRCCCompile" | |
Condition="'@(QtRCCCompile)' != ''" | |
DependsOnTargets="SelectQtRCCCompile;CalculateQtRCCDeps" | |
Inputs="@(QtRCCCompile);%(QtRCCCompile.AdditionalDependencies);" | |
Outputs="%(OutputFile)" | |
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<StringListProperty | |
Name="AdditionalDependencies" | |
Subtype="file" | |
DisplayName="Additional Dependencies" | |
Description="Provide additional dependencies that affect the end result. Note: files, listed inside the QRC are determined automatically and should not be added manually." | |
IncludeInCommandLine="False" | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment