views:

495

answers:

1

I am building a console QT project.

Currently, my project file looks like this:

CONFIG += qt console debug 
CONFIG -= app_bundle

HEADERS = HelperClass.h
SOURCES = HelperClass.cpp \
      main.cpp
TARGET = doit

My QMAKESPEC environment variable is set to: macx-g++

I go to the directory with the project (and source) files and run qmake (which builds a Makefile) then make to build the project. The object files (*.o) from the compile are placed in the same directory with my source and the executable.

How do I configure this build to place those object files in a sub directory so they don't pollute my source area?

+2  A: 

set OBJECTS_DIR:

OBJECTS_DIR = ../myproject/tmp

See http://doc.qtsoftware.com/4.5/qmake-variable-reference.html#objects-dir

Jesse