1

No matter what i do i can't get the folder qmake/temp to not appear in x64/Debug in my project folder. All other build files including qt, follow the visual studio Output Directory path specified in the project settings. This is only happening for newer projects, my old projects use the Output Directory path variable.

I've compared all the settings between a older project that works and the new one which doesnt and they are all the same.

nONSENCE
  • 56
  • 5

1 Answers1

1

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.

Yan Ha
  • 11
  • 2