【发布时间】:2015-03-23 17:52:36
【问题描述】:
我正在使用 win32、macx 和 unix:!macx aka。我的.pro 文件中的 Linux if 语句,用于指定操作系统特定的任务,例如
win32 {
TARGET = myapp
RC_FILE = myapp.rc
}
macx {
TARGET = MyApp
ICON = myapp.icns
QMAKE_INFO_PLIST = Info.plist
}
unix:!macx { # linux
CONFIG(debug, debug|release) {
TARGET = myapp-debug
}
CONFIG(release, debug|release) {
TARGET = myapp
}
}
这适用于if X else、if X elseif X else 和if not X,其中X 是操作系统说明符。
有没有办法告诉 qmake 它必须为os1 或os2 编译一个块?
【问题讨论】: