介紹些qmake使用頻率較高的函數。
defined(name[, type])
type | 含義 |
---|---|
test | 檢查測試函數 |
replace | 檢查代替函數 |
var | 檢查變量 |
defined(COPY_TARGET, var) { ... }
contains(variablename, value)
contains(QT, core) { ... }
equals(variablename, value)
TARGET = Test equals(TARGET, "Test") { ... }
message(string) log(string) warning(string) error(string)
greaterThan(variablename, value)
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
system(command)