Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How I can instruct a Qt Creator PRO file to output the *.o files and moc_* files in separate folder?

Currently QtCreator creates .o and moc_ files in the root folder of the application. How I can instruct the project file to put them in a subfolder called "obj"?

like image 578
Gad D Lord Avatar asked May 30 '11 22:05

Gad D Lord


1 Answers

You can use the OBJECTS_DIR and MOC_DIR variables for this. e.g. Qt itself does something like this while building:

OBJECTS_DIR = .obj
MOC_DIR     = .moc

In this case I think the .obj, .moc directories are relative to the directory containing the Makefile.

like image 130
rohanpm Avatar answered Oct 03 '22 23:10

rohanpm