The temporary files generated by qmake will be forced to be generated in the intermediate directory. You can check the local qt_private.props
file located at C:\Users\{User}\AppData\Local\QtMsBuild
.
To begin with, you need to modify the project settings for the intermediate directory. Then, edit the .vcxproj
file to ensure that the <IntDir>
node appears before the <Import Project="$(QtMsBuild)\Qt.props" />
line. For example:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<IntDir>_obj\$(Configuration)\</IntDir>
</PropertyGroup>
...
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(QtMsBuild)\Qt.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(QtMsBuild)\Qt.props" />
</ImportGroup>
or, Set QtVarsOutputDir
before importing Qt.props
, so the Condition
in the qt_private.props
file will be set to false.