Questions about qmake and the project file
-
Here's the first few lines of my project's .pro file:
@######################################################################Automatically generated by qmake (2.01a) Mon Mar 28 17:09:16 2011
######################################################################
TEMPLATE = app
TARGET =
DEPENDPATH += . headers src
INCLUDEPATH += . headersAPP_QML_FILES.files = DemodShaperFilter.qml
APP_QML_FILES.path = Contents/MacOS
QMAKE_BUNDLE_DATA += APP_QML_FILES
@A couple of questions:
-
I know that this file is automatically generated by qmake (after all, it says so in the comment!), but...qmake seems "smart" enough to prevent my modifications from being deleted. At least, running qmake doesn't seem to wipe them out. Can someone confirm this, and perhaps explain how this happens?
-
My project uses several data files that need to be co-resident with the application binary. It would be really cool if I could have those automatically moved into the same folder that the .qml file in the example above goes into. How might I make this happen?
Thanks.
-
-
The .pro file is generated by following command:
@
qmake -project
@
Run qmake -h to get more help.Then the created .pro file shoule be edited manually or through IDE such as QtCreator.
-
Regarding #1:
If you call@qmake -project@
your .pro file is wiped out and replaced by the newly generated one. Be careful!
If you just call
@qmake@
then qmake just reads the .pro file and generates Makefile (and probably Makefile.Debug and Makefile.Release) for you.
Regarding #2:
You can add your own target in the .pro file, just replace APP_QML_FILES with something you like and adjust the file list. -
Is there a way to put multiple files on a single line? Like:
@APP_COEFF_FILES.files = coeffdemodshaper.txt coeffmodnyquist.txt
APP_COEFF_FILES.path = Contents/MacOSQMAKE_BUNDLE_DATA += APP_COEFF_FILES
@I've tried it with and without a comma, and both give me a build error:
bq. make: *** No rule to make target
coeffmodnyquist.txt', needed by
simulatorGUI.app/Contents/MacOS/coeffmodnyquist.txt'. Stop.Thanks.
EDIT:
OK, I can see why this wouldn't work. So, can I specify a subdirectory's entire contents as part of the bundle?