Search code examples
qtsublimetext3

Build system for Qt in Sublime Text 3 not working


I have the following build system file which not working.

{
"cmd" : ["qmake", "-project"],
"cmd" : ["qmake"],
"cmd" : ["make"],
"working_dir": "${project_path:${folder}}",
}

No files are generated. Usually following files should be created:

  • qmake -project generates a .pro file.
  • qmake generates the makefile
  • make generates the executable file

How can I run multiple commands in the build file?


Solution

  • You could make a bash file with all the commands in it, and set the command to that.

    {
        "cmd" : ["my_build.sh"],
        "working_dir": "${project_path:${folder}}",
    }
    
    # my_build.sh
    qmake -project
    qmake
    make