Within the .pro file, things are straightforward if you're including header files (use HEADERS
), C++ files (use SOURCES
) and Objective-C / Objective-C++ files (use OBJECTIVE_SOURCES
), but it is less clear to me how other file types should be included.
e.g. looking at various examples that Qt provide, there is inconsistency about whether QML files should be DISTFILES
, OTHER_FILES
or contained within a .qrc file (i.e. RESOURCES
). I've gone with putting QML files in a qml.qrc
file.
My question has arisen because I'm including data files, such as audio .wav files, within a .qrc file (also as shown in Qt examples; e.g. Qt Quick Demo - Maroon in Trouble) but this has slowed compiling down to a crawl. And in the case of MinGW on Windows, it simply crashes with an out of memory error when it reaches 1GB. There must be a better way to include these!
Could you provide a guide as to when to use:
DISTFILES
OTHER_FILES
RESOURCES