TARGET = MyProgDESTDIR = $$_PRO_FILE_PWD_/../_dest_dirTEMPLATE = app #TEMPLATE = lib#CONFIG += plugin#===============================ROOTMYPROJ= $$_PRO_FILE_PWD_PLATFORM = X3win32 : PLATFORM = win32unix : PLATFORM = unix# Детектор компилятораcontains( MAKEFILE_GENERATOR, MSVC.NET|MSBUILD ): { # build msvc #message("=== msvc build detected!") MY_TOOLCHANE = $$sprintf('qt%1_msvc', $$QT_VERSION)} else: { contains( MAKEFILE_GENERATOR, MINGW ): { # build mingw #message("=== mingw build detected!") MY_TOOLCHANE = $$sprintf('qt%1_mingw', $$QT_VERSION) } else: { #message("=== GCC build detected!") MY_TOOLCHANE = $$sprintf('qt%1_g++', $$QT_VERSION) }}# Создание директорийRCC_DIR = $$sprintf('$$ROOTMYPROJ/tmp/%1/%2/%3/rcc', $$PLATFORM, $$MY_TOOLCHANE, $$TARGET)MOC_DIR = $$sprintf('$$ROOTMYPROJ/tmp/%1/%2/%3/moc', $$PLATFORM, $$MY_TOOLCHANE, $$TARGET)UI_DIR = $$sprintf('$$ROOTMYPROJ/tmp/%1/%2/%3/_ui', $$PLATFORM, $$MY_TOOLCHANE, $$TARGET)# И обязательно различые директории для объектных файловCONFIG(debug, debug|release):{ OBJECTS_DIR = $$sprintf('$$ROOTMYPROJ/tmp/%1/%2/%3/objd', $$PLATFORM, $$MY_TOOLCHANE, $$TARGET) # Добавить префикс d TARGET = $$sprintf('%1d', $$TARGET)}else:{ OBJECTS_DIR = $$sprintf('$$ROOTMYPROJ/tmp/%1/%2/%3/objr', $$PLATFORM, $$MY_TOOLCHANE, $$TARGET)}# на всякий случайTARGET=$$TARGET# и не лениться отлаживать выводом сообщенийmessage(DESTDIR = $$DESTDIR)message(DESTDIR = $$OBJECTS_DIR)message(TARGET = $$TARGET)