I'm generating Visual Studio 2013 projects with Qt 5.3 qmake. In my .pro file, I've got the following line:
MOC_DIR = $$BUILD_DIR/<DEBUG OR RELEASE>/moc
If I message($$MOC_DIR), the path is correctly formed. However, when I build in VS, the moc_<CLASS>.cpp files are not generated in that location, but instead end up in the same directory as the .pro. I get the following warning during compilation:
Two or more files with the name of
moc_<CLASS>.cppwill produce outputs to the same location
That's not surprising, because if I look at the contents of the generated .vcxproj, I see the following (irrelevant tags/text elided ...):
<CustomBuild Include="..\include\Class.hpp">
    ...
    <Outputs Condition="...Release...">moc_Class.cpp;%(Outputs)</Outputs>
    ...
    <Outputs Condition="...Debug...">moc_Class.cpp;%(Outputs)</Outputs>
    ...
</CustomBuild>
Why does is my custom MOC_DIR being ignored?