Merge pull request #5551 from shuffle2/msbuild-qt-tidy
msbuild/qt: remove .qrc and .ui file support
This commit is contained in:
commit
59bf761f87
|
@ -37,44 +37,6 @@
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
|
||||||
<!--Passes all .qrc files to rcc and puts output in the build directory-->
|
|
||||||
<ItemGroup>
|
|
||||||
<ResFiles Include="$(MSBuildProjectDirectory)\**\*.qrc" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Target Name="QtResource"
|
|
||||||
BeforeTargets="ClCompile"
|
|
||||||
Inputs="@(ResFiles)"
|
|
||||||
Condition="'@(QtResource)'!=''"
|
|
||||||
Outputs="@(ResFiles->'$(QtToolOutDir)qrc_%(Filename).h')">
|
|
||||||
<Message Text="rcc %(ResFiles.Filename)" Importance="High" />
|
|
||||||
<Error Condition="!$(QtDirValid)" Text="QTDIR not set or non-existent (pull the submodule?)" />
|
|
||||||
<MakeDir Directories="$(QtToolOutDir)" />
|
|
||||||
<Exec Command=""$(QtBinDir)rcc.exe" "%(ResFiles.FullPath)" -o "$(QtToolOutDir)qrc_%(ResFiles.Filename).h"" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="QtResourceClean">
|
|
||||||
<Delete Files="@(ResFiles->'$(QtToolOutDir)qrc_%(Filename).h')" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<!--Passes all .ui files to uic and puts output in the build directory-->
|
|
||||||
<ItemGroup>
|
|
||||||
<UiFiles Include="$(MSBuildProjectDirectory)\**\*.ui" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Target Name="QtUi"
|
|
||||||
BeforeTargets="ClCompile"
|
|
||||||
Inputs="@(UiFiles)"
|
|
||||||
Condition="'@(QtUi)'!=''"
|
|
||||||
Outputs="@(UiFiles->'$(QtToolOutDir)ui_%(Filename).h')">
|
|
||||||
<Message Text="uic %(UiFiles.Filename)" Importance="High" />
|
|
||||||
<Error Condition="!$(QtDirValid)" Text="QTDIR not set or non-existent (pull the submodule?)" />
|
|
||||||
<MakeDir Directories="$(QtToolOutDir)" />
|
|
||||||
<Exec Command=""$(QtBinDir)uic.exe" "%(UiFiles.FullPath)" -o "$(QtToolOutDir)ui_%(UiFiles.Filename).h"" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="QtUiClean">
|
|
||||||
<Delete Files="@(UiFiles->'$(QtToolOutDir)ui_%(Filename).h')" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<!--Compile files needed to MOC and output in the build directory-->
|
<!--Compile files needed to MOC and output in the build directory-->
|
||||||
<!--TODO find a way to autocreate from ClCompile settings-->
|
<!--TODO find a way to autocreate from ClCompile settings-->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
@ -112,12 +74,6 @@
|
||||||
<!--Expose the new targets to VS-->
|
<!--Expose the new targets to VS-->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
|
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
|
||||||
<AvailableItemName Include="QtResource">
|
|
||||||
<Targets>QtResource</Targets>
|
|
||||||
</AvailableItemName>
|
|
||||||
<AvailableItemName Include="QtUi">
|
|
||||||
<Targets>QtUi</Targets>
|
|
||||||
</AvailableItemName>
|
|
||||||
<AvailableItemName Include="QtMoc">
|
<AvailableItemName Include="QtMoc">
|
||||||
<Targets>QtMoc</Targets>
|
<Targets>QtMoc</Targets>
|
||||||
</AvailableItemName>
|
</AvailableItemName>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<CleanDependsOn>QtResourceClean;QtUiClean;QtMocClean;$(CleanDependsOn)</CleanDependsOn>
|
<CleanDependsOn>QtMocClean;$(CleanDependsOn)</CleanDependsOn>
|
||||||
<!--
|
<!--
|
||||||
<ComputeLinkInputsTargets>$(ComputeLinkInputsTargets);QtComputeMocOutput;</ComputeLinkInputsTargets>
|
<ComputeLinkInputsTargets>$(ComputeLinkInputsTargets);QtComputeMocOutput;</ComputeLinkInputsTargets>
|
||||||
<ComputeLibInputsTargets>$(ComputeLibInputsTargets);QtComputeMocOutput;</ComputeLibInputsTargets>
|
<ComputeLibInputsTargets>$(ComputeLibInputsTargets);QtComputeMocOutput;</ComputeLibInputsTargets>
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ProjectSchemaDefinitions xmlns="http://schemas.microsoft.com/build/2009/properties">
|
<ProjectSchemaDefinitions xmlns="http://schemas.microsoft.com/build/2009/properties">
|
||||||
<ItemType Name="QtResource" DisplayName="Qt Resource File" />
|
|
||||||
<ItemType Name="QtUi" DisplayName="Qt User Interface File" />
|
|
||||||
<ItemType Name="QtMoc" DisplayName="Qt Meta Object File" />
|
<ItemType Name="QtMoc" DisplayName="Qt Meta Object File" />
|
||||||
<ContentType Name="QtUi" DisplayName="Qt User Interface Compiler" />
|
|
||||||
<ContentType Name="QtResource" DisplayName="Qt Resource Compiler" />
|
|
||||||
<ContentType Name="QtMoc" DisplayName="Qt Meta Object Compiler" />
|
<ContentType Name="QtMoc" DisplayName="Qt Meta Object Compiler" />
|
||||||
<FileExtension Name="*.qrc" ContentType="QtResource" />
|
|
||||||
<FileExtension Name="*.ui" ContentType="QtUi" />
|
|
||||||
</ProjectSchemaDefinitions>
|
</ProjectSchemaDefinitions>
|
Loading…
Reference in New Issue