[Qt-creator] set directories for file (types)

Matthias Pospiech matthias.pospiech at gmx.de
Wed Feb 11 21:13:25 CET 2009


Matthias Pospiech schrieb:
> I usually set up my files in the following way
>
> /bin/debug
> /bin/release
> /build/debug
> /build/release
> /include/
> /src/
> /src/ui/
> /src/moc
>
> The main folder then only contains the project files.
>
> Is there a chance to set up qtcreator to behave like this?
>
>   
Just if someone is interested in this, I realised such a structure with 
the following qmake .pro code:

Any comments welcome.

# -------------------------------------------------

# Define Variables

# -------------------------------------------------

BUILD_DIR = build

BIN_DIR = bin

# -------------------------------------------------

win32 {

DEBUG_SUFFIX = d

}

CONFIG(debug, debug|release) {

SUFFIX_STR = $${DEBUG_SUFFIX}

}

else {

SUFFIX_STR = $${RELEASE_SUFFIX}

}

# -------------------------------------------------

# -------------------------------------------------

# Target Directory

# -------------------------------------------------

debug {

DESTDIR = $${BIN_DIR}/debug/

}

release{

DESTDIR = $${BIN_DIR}/release/

}

# -------------------------------------------------

# Executable Filename

# -------------------------------------------------

TARGET = $${BINARY_NAME}$${SUFFIX_STR}

#CONFIG += qt thread debug

# -------------------------------------------------

# Prepocessor Definitions

# -------------------------------------------------

win32{

#DEFINES += QWT_DLL

DEFINES += NOMINMAX

}

# -------------------------------------------------

# Objects Directory

# -------------------------------------------------

debug {

OBJECTS_DIR = $${BUILD_DIR}/debug/

}

release{

OBJECTS_DIR = $${BUILD_DIR}/release/

}

# -------------------------------------------------

# Moc Directory

# -------------------------------------------------

MOC_DIR = moc

# -------------------------------------------------

# Moc Directory

# -------------------------------------------------

UI_DIR = ui

# -------------------------------------------------

# Include directories

# -------------------------------------------------

INCLUDEPATH = 
src;ui;include;include/boost;include/fftw;include/qwt;include/qextserialport;include/matthias/qtwidgets;include/matthias/SMX;include/matthias/GPIB;include/matthias/PI;include/matthias/PiezoJena;include/matthias/Math;include/matthias/qwtplot;include/matthias/Common;

# -------------------------------------------------

# Libaries

# -------------------------------------------------

#unix{

# LIBS += -L/usr/local/lib -lmath

#}

win32{

# debug{

# LIBS += lib/GPIB/gpib-32.obj

# LIBS += lib/MMC/MMC413.lib

# LIBS += lib/qextserialport/debug/qextserialport.lib

# LIBS += lib/qwt/msvc/debug/qwtd5.lib

# LIBS += lib/fftw/double/libfftw3-3.lib

# }

# release{

# LIBS += lib/GPIB/gpib-32.obj

# LIBS += lib/MMC/MMC413.lib

# LIBS += lib/qextserialport/release/qextserialport.lib

# LIBS += lib/qwt/msvc/release/qwt5.lib

# LIBS += lib/fftw/double/libfftw3-3.lib

# }

debug{

# LIBS += lib/qwt/mingw/debug/libqwtd5.a

}

release{

# LIBS += lib/qwt/mingw/debug/libqwt5.a

}

}

Matthias







More information about the Qt-creator-old mailing list