Folder depending on the architecture doesn't work



  • In my Qt project I have 4 build configurations in Windows.

    • x86 Debug
    • x86 Release
    • x64 Debug
    • x64 Release

    I want to put the exe file to a different folder for every one and I use the following lines in .pro:

    @DESTDIR = ./bin/$$ARCHITECTURE/$$COMPILATION
    OBJECTS_DIR = ./tmp/$$ARCHITECTURE/$$COMPILATION@

    It works fine and the final directories are:

    • ./bin/x86/debug
    • ./bin/x86/release
    • ./bin/x64/debug
    • ./bin/x64/release

    The problem is that when I want to execute the program from Qt Creator it always executes the x86 version.
    In "Projects" -> "Run Settings" -> "Executable" in the 4 builds appear:

    • Executable: (My Directory)\bin\x86\debug\MyExeFile.exe
    • Executable: (My Directory)\bin\x86\release\MyExeFile.exe
    • Executable: (My Directory)\bin\x86\debug\MyExeFile.exe
    • Executable: (My Directory)\bin\x86\release\MyExeFile.exe

    Any idea how to solve this problem?
    Thanks


  • Moderators

    Why don't you just use shadow building and remove this hack?



  • Because I want 4 different builds



  • You can set different shadow build dirs for different build configurations.



  • But it can be in the same directory where I put now? Or I have to put it outside?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.