c++visual-studioqmakeqt-vs-addin

How to change qmake output path in QT VS Tools


My project's MSVS settings produce the following file tree:

|- .vs
|- Build-x64 // output dir
   |- Debug  // $(Configuration)
      |- .inter // intermediate files
|- MyApp
   |- x64 // Qt output dir
   ...
   |- source files
-MyApp.sln

I want to output qt intermediate files inside Build-x64 folder like so:

|- .vs
|- Build-x64 // output dir
   |- Debug  // $(Configuration)
      |- .inter // intermediate files
         |- Qt  // Qt output dir
|- MyApp
   |- source files
-MyApp.sln

Solution

  • The Simons' link in comments may actually work, but I have found a better solution here. The solution there supposes to use VS' property manager. Here is an except for changing OutDir and IntDir:

    The Qt's paths can be changed in the corresponding parts of settings in property manger. For example you can change Qt Meta-object Compiler -> moc -> OutputDir to $(IntDir)moc\.

    However this method didn't work for one of my projects, that had been already imported using Qt VS tools. I needed to remove all project' files, setup dirs and only then readd all of the files again.