summaryrefslogtreecommitdiffstats
path: root/qmake/doc/snippets/qmake/scopes.pro
blob: 672193775543c810224d7c88e048ecaab36318e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#! [syntax]
<condition> {
    <command or definition>
    ...
}
#! [syntax]

#! [0]
win32 {
    SOURCES += paintwidget_win.cpp
}
#! [0]

#! [1]
!win32 {
    SOURCES -= paintwidget_win.cpp
}
#! [1]

unix {
    SOURCES += paintwidget_unix.cpp
}

#! [2]
macx {
    CONFIG(debug, debug|release) {
        HEADERS += debugging.h
    }
}
#! [2]

#! [3]
macx:CONFIG(debug, debug|release) {
    HEADERS += debugging.h
}
#! [3]

#! [4]
win32|macx {
    HEADERS += debugging.h
}
#! [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]