| | |
| | | <ItemGroup>
|
| | | <QMakeArgsList Condition="'$(QMakeOptionEarly)' == 'true'" Include="-early"/>
|
| | | <QMakeArgsList Include="CONFIG -= debug release debug_and_release"/>
|
| | | <QMakeArgsList Include="CONFIG += $(QtBuildConfig)"/>
|
| | | <QMakeArgsList Include="CONFIG += $(QtBuildConfig) warn_off"/>
|
| | | <QMakeArgsList Condition="'$(QtPlugin)' == 'true'" Include="CONFIG += plugin"/>
|
| | | <QMakeArgsList Include="$(QMakeExtraArgs)"/>
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | |
| | | $(QtVarsProFileInput)
|
| | | DEFINES -= UNICODE _UNICODE
|
| | | </QtVarsProFileInput>
|
| | | <!--
|
| | | # Add dummy QML object if needed -->
|
| | | <QtVarsProFileInput Condition="$(QtModules.Contains('quick'))">
|
| | | $(QtVarsProFileInput)
|
| | | RESOURCES += qml.qrc
|
| | | </QtVarsProFileInput>
|
| | | </PropertyGroup>
|
| | |
|
| | | <!--// Write dummy QML and QRC files -->
|
| | | <WriteLinesToFile
|
| | | Condition="$(QtModules.Contains('quick'))"
|
| | | File="$(QtVarsWorkDir)\main.qml"
|
| | | Lines="
|
| | | import QtQuick
|
| | | DummyQmlObject { }
|
| | | "/>
|
| | | <WriteLinesToFile
|
| | | Condition="$(QtModules.Contains('quick'))"
|
| | | File="$(QtVarsWorkDir)\qml.qrc"
|
| | | Lines="
|
| | | <RCC>
|
| | | <qresource prefix="/">
|
| | | <file>main.qml</file>
|
| | | </qresource>
|
| | | </RCC>
|
| | | "/>
|
| | |
|
| | | <!--// Write .pro file to temp path -->
|
| | | <WriteLinesToFile
|
| | |
| | | <Cmd><![CDATA["$(QtToolsPath)/qmake" $(QMakeArgs) qtvars.pro]]></Cmd>
|
| | | </PropertyGroup>
|
| | | <HostExec
|
| | | Condition="'$(ApplicationType)' == 'Linux'"
|
| | | Command="$(Cmd)" RedirectStdOut="qtvars.log" RedirectStdErr="STDOUT"
|
| | | WorkingDirectory="@(WorkDir->'%(HostPath)')"
|
| | | Inputs="@(QMakeProj)"
|
| | |
| | | IgnoreExitCode="true">
|
| | | <Output TaskParameter="ExitCode" PropertyName="ErrorLevel"/>
|
| | | </HostExec>
|
| | |
|
| | | <!--// Run qmake in Windows: set %CD% to subfolder of %TEMP% -->
|
| | | <PropertyGroup
|
| | | Condition="'$(ApplicationType)' != 'Linux'">
|
| | | <QMakeTempDir>$(Temp)\$([System.IO.Path]::GetRandomFileName())</QMakeTempDir>
|
| | | </PropertyGroup>
|
| | | <MakeDir
|
| | | Condition="'$(ApplicationType)' != 'Linux'"
|
| | | Directories="$(QMakeTempDir)" />
|
| | | <Copy
|
| | | Condition="'$(ApplicationType)' != 'Linux'"
|
| | | SourceFiles="$(QtVarsWorkDir)\qtvars.pro"
|
| | | DestinationFolder="$(QMakeTempDir)" />
|
| | | <Copy
|
| | | Condition="'$(ApplicationType)' != 'Linux' AND Exists('$(QtVarsWorkDir)\main.qml')"
|
| | | SourceFiles="$(QtVarsWorkDir)\main.qml"
|
| | | DestinationFolder="$(QMakeTempDir)" />
|
| | | <Copy
|
| | | Condition="'$(ApplicationType)' != 'Linux' AND Exists('$(QtVarsWorkDir)\qml.qrc')"
|
| | | SourceFiles="$(QtVarsWorkDir)\qml.qrc"
|
| | | DestinationFolder="$(QMakeTempDir)" />
|
| | | <HostExec
|
| | | Condition="'$(ApplicationType)' != 'Linux'"
|
| | | Command="$(Cmd)" RedirectStdOut="qtvars.log" RedirectStdErr="STDOUT"
|
| | | WorkingDirectory="$(QMakeTempDir)"
|
| | | IgnoreExitCode="true">
|
| | | <Output TaskParameter="ExitCode" PropertyName="ErrorLevel"/>
|
| | | </HostExec>
|
| | | <ItemGroup>
|
| | | <QMakeGeneratedFiles Include="$(QMakeTempDir)\*" />
|
| | | </ItemGroup>
|
| | | <Copy
|
| | | Condition="'$(ApplicationType)' != 'Linux'"
|
| | | SkipUnchangedFiles="true"
|
| | | SourceFiles="@(QMakeGeneratedFiles)"
|
| | | DestinationFolder="$(QtVarsWorkDir)" />
|
| | | <RemoveDir
|
| | | Condition="'$(ApplicationType)' != 'Linux'"
|
| | | Directories="$(QMakeTempDir)" />
|
| | |
|
| | | <!--// Check qmake result -->
|
| | | <PropertyGroup
|
| | |
| | | <!--// In design-time, copy generated .props to randomly named file -->
|
| | | <PropertyGroup>
|
| | | <QtVarsDesignTimeNew
|
| | | Condition="'$(ErrorLevel)' == '0' AND '$(QtVSToolsBuild)' == 'true'"
|
| | | Condition="'$(ErrorLevel)' == '0' AND '$(QtDesignTimeBuild)' == 'true'"
|
| | | >$([System.IO.Path]::Combine('$(TEMP)','$([System.IO.Path]::GetRandomFileName()).designtime.props'))
|
| | | </QtVarsDesignTimeNew>
|
| | | </PropertyGroup>
|
| | | <Copy
|
| | | Condition="'$(ErrorLevel)' == '0' AND '$(QtVSToolsBuild)' == 'true'"
|
| | | Condition="'$(ErrorLevel)' == '0' AND '$(QtDesignTimeBuild)' == 'true'"
|
| | | SourceFiles="$(QtVarsFilePath)" DestinationFiles="$(QtVarsDesignTimeNew)"/>
|
| | | <WriteLinesToFile
|
| | | Condition="'$(ErrorLevel)' == '0' AND '$(QtVSToolsBuild)' == 'true'"
|
| | | Condition="'$(ErrorLevel)' == '0' AND '$(QtDesignTimeBuild)' == 'true'"
|
| | | File="$(QtVarsIndexPathDesignTime)" Overwrite="true" Lines="$(QtVarsDesignTimeNew)"/>
|
| | |
|
| | | <!--// Clean-up -->
|