我该如何在Qt中使用一个.pro文件来指定多个具有不同配置的目标?
例如,我想要构建以下两个.pro文件(而不必每次手动更改.pro文件):
目标A:
QT += network
TEMPLATE = app
SOURCES += main.cpp \
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
RESOURCES += resource.qrc
TARGET = targetA
DEFINES += PARAMA
目标B:
QT += network
TEMPLATE = app
SOURCES += main.cpp \
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
RESOURCES += resource.qrc
TARGET = targetB
DEFINES += PARAMB