tags:

views:

247

answers:

1

Hello.

While building .pro project using QTCreator on windows, it will create an makefile and .o files in debug/release folder. Since i need only .exe, is it possible to configure QTCreator to put all intermediate files (makefiles, .o files etc) into something like c:\tmp and resulting .exe into specified folder like c:\out\debug or c:\out\release ?

+3  A: 

You can specify everything in the .pro file.

For example, the binary will end up in DESTDIR so

win32 {
  DESTDIR = C:/myQt/bin

  MOC_DIR      = C:/tmp/moc
  OBJECTS_DIR  = C:/tmp/obj

}

would set up an unusual output directory as well as temporary directories below C:/tmp.

Dirk Eddelbuettel
That works for output and .o files, but 2 makefiles are still created in the .pro folder. Is it possible to get rid of them too?
Eye of Hell
You could create a shell script that calls qmake, then calls make and then removes the Makefile(s).
Dirk Eddelbuettel