Specifying the build directory when compiling through command line



  • When the application is compiled through Qt Creator, the object files are generated in the directory (build-%{CurrentProject:Name}-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}) speicified in Qt Creator -> Tools -> Options -> Build and Run

    I am looking for the qmake/jom opion or qmake variable to speciffy the build directory when the application is compiled through command line, f.e. with the following commands:

    • qmake.exe pam.pro -spec win32-msvc2015 "CONFIG+=debug" "CONFIG+=qml_debug"
    • C:\Qt\Tools\QtCreator\bin\jom.exe qmake_all
    • C:\Qt\Tools\QtCreator\bin\jom.exe

  • Qt Champions 2016



  • there is no particular parameter, just create the folder, move to it and then call qmake with the path to the .pro file. in your case:

    mkdir build
    cd build
    qmake.exe ..\pam.pro -spec win32-msvc2015 "CONFIG+=debug" "CONFIG+=qml_debug"
    C:\Qt\Tools\QtCreator\bin\jom.exe qmake_all
    C:\Qt\Tools\QtCreator\bin\jom.exe
    

Log in to reply
 

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