开发者_运维知识库I am (very) new to qmake, but i would like to use qmake to build whole project automatically, so recursively check all subdirs and build every file.
I have a pch file too.
Is there a way to do it? Thanks ahead!
The simplest way is to let qmake generate the qmake file for you.
After making a backup copy of any exist *.pro files you may need to reference, go to the top level of your directory structure and issue the command qmake -project
. This tells qmake to recurse the tree and locate everything it needs to build and create a qmake project file from it.
Next, edit the generated qmake file. You will at least need to change the TEMPLATE line to be "lib" instead of "app". You will also want to specify the name of the TARGET. There may also be some other things you wish to change.
Now that you have a qmake file, you need to generate a make file. Run qmake again, but this time just say qmake
without any arguments.
Finally, you should be able to just run make
and have things build. [For future readers running Windows with the MingW tools, make
should be replaced with mingw32-make
]
精彩评论