Doc: Extend the documentation about qmake scopes
Fixes: QTBUG-18025 Change-Id: I2b587266cde2002d965dc824a869be255cf3522e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
parent
11c5c078c7
commit
8bfdb25c1f
@ -40,3 +40,21 @@ win32|macx {
|
|||||||
HEADERS += debugging.h
|
HEADERS += debugging.h
|
||||||
}
|
}
|
||||||
#! [4]
|
#! [4]
|
||||||
|
|
||||||
|
#! [5]
|
||||||
|
if(win32|macos):CONFIG(debug, debug|release) {
|
||||||
|
# Do something on Windows and macOS,
|
||||||
|
# but only for the debug configuration.
|
||||||
|
}
|
||||||
|
win32|if(macos:CONFIG(debug, debug|release)) {
|
||||||
|
# Do something on Windows (regardless of debug or release)
|
||||||
|
# and on macOS (only for debug).
|
||||||
|
}
|
||||||
|
#! [5]
|
||||||
|
|
||||||
|
#! [6]
|
||||||
|
win32-* {
|
||||||
|
# Matches every mkspec starting with "win32-"
|
||||||
|
SOURCES += win32_specific.cpp
|
||||||
|
}
|
||||||
|
#! [6]
|
||||||
|
@ -4418,6 +4418,20 @@
|
|||||||
|
|
||||||
\snippet qmake/scopes.pro 4
|
\snippet qmake/scopes.pro 4
|
||||||
|
|
||||||
|
If you need to mix both operators, you can use the \c if function to specify
|
||||||
|
operator precedence.
|
||||||
|
|
||||||
|
\snippet qmake/scopes.pro 5
|
||||||
|
|
||||||
|
The condition accepts the wildcard character to match a family of \c{CONFIG}
|
||||||
|
values or mkspec names.
|
||||||
|
|
||||||
|
\snippet qmake/scopes.pro 6
|
||||||
|
|
||||||
|
\note Historically, checking the mkspec name with wildcards like above was
|
||||||
|
qmake's way to check for the platform. Nowadays, we recommend to use values
|
||||||
|
that are defined by the mkspec in the \c QMAKE_PLATFORM variable.
|
||||||
|
|
||||||
You can also provide alternative declarations to those within a scope by
|
You can also provide alternative declarations to those within a scope by
|
||||||
using an \c else scope. Each \c else scope is processed if the conditions
|
using an \c else scope. Each \c else scope is processed if the conditions
|
||||||
for the preceding scopes are false.
|
for the preceding scopes are false.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user