Xcode – Building Qt Xcode Projects From the Command Line

macosmakefileqtxcode

I've been playing around with Qt for a few hours now. I found that qmake produces Xcode project files on Mac OS X instead of good ol' makefiles. I don't want to launch Xcode every time I want to build "Hello, world".

How do I make qmake generate regular makefiles or, if that's something that cannot be done on the Mac, how do I compile .xcodeproj files from the command line?

I tried xcodebuild -project myProject -alltargets. I get a lot of output followed by Abort trap.

Best Answer

$ man xcodebuild

So a typical command might be something like:

$ xcodebuild -project myProject.xcodeproj -alltargets