PDA

View Full Version : Qmake



High|ander
16th March 2007, 13:32
Hello guys.

I'm new to this forum and i'm going to start programming in QT to fill my spare time smile

I was looking at buildsystems and i got interessed in Qmake.
I just have some questions:


How do I add directorys for it to compile so that I can create different directories that contains code for different modules?
How do i config it to be able to run commands like: "make debug" and "make release"


Thanks!

// Johan

jpn
16th March 2007, 14:11
Hello guys.

I'm new to this forum and i'm going to start programming in QT to fill my spare time smile

Hello and welcome! :)




How do I add directorys for it to compile so that I can create different directories that contains code for different modules?
How do i config it to be able to run commands like: "make debug" and "make release"



use the SUBDIRS template (http://doc.trolltech.com/4.2/qmake-variable-reference.html#subdirs)
for example: "qmake -config debug; make" or "qmake -config release; make"

jacek
16th March 2007, 14:14
How do i config it to be able to run commands like: "make debug" and "make release"
You can also add:
CONFIG += debug_and_releaseto your .pro file and then use make -f Makefile.Release and make -f Makefile.Debug.

High|ander
16th March 2007, 14:25
Oh, it was that easy ! Thanks!

fullmetalcoder
16th March 2007, 17:11
You can also add:to your .pro file and then use make -f Makefile.Release and make -f Makefile.Debug.
Another (simpler) syntax that can be used along the debug_and_release option is :
$ make release
or :
$ make debug
:)