PDA

View Full Version : Can you specify where to create the .qrc file?



SpiceWeasel
29th March 2017, 13:15
Hello,

Is there a way to specify where the output of RCC (the .qrc file) should be placed/created?

My .pro file has the following two lines:



MOC_DIR = ./.tmp
OBJECTS_DIR = ./.tmp


However, when I compile my application, the resulting .qrc appears in the base directory along with the executable. I've looked through the documentation for QMAKE and RCC, and also online, but haven't found solution.

high_flyer
29th March 2017, 13:51
What do you mean by "the resulting .qrc"?
A qrc file is an input file, not a result file.
In the qrc file you specify the resources you want compiled in to your project.
You specify the location of your qrc file with RESOURCES = <path_to_qrc_file>
http://doc.qt.io/qt-5/resources.html

SpiceWeasel
3rd April 2017, 13:53
Sorry, I confused terms. I was referring to the output file generated from the .qrc file.

The processing of an XXXX.qrc file generates a qrc_XXXX.cpp file. The latter file appears in the base directory along with the executable. Does the project file support and option to direct where this intermediate file should be generated (like it does for object and moc files)?

Lesiok
3rd April 2017, 14:11
RCC_DIR = the directory where all intermediate resource files should be placed

SpiceWeasel
4th April 2017, 13:18
RCC_DIR = the directory where all intermediate resource files should be placed

Wow, I can't believe I missed that. I went through the qmake manual but must have skipped right over it.

Thanks very much, that solved my issue.