aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/minimumSystemVersion/minimumSystemVersion.qbs
blob: 177022381c4dfc0761e57aa3f1dcc87faa809979 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import qbs 1.0

Project {
    // no minimum versions are specified so the profile defaults will be used
    QtApplication {
        name: "unspecified"
        files: "main.cpp"
        consoleApplication: true

        Properties {
            condition: qbs.targetOS.contains("darwin")
            cpp.frameworks: "Foundation"
        }
    }

    // no minimum versions are specified, and explicitly set to undefined in
    // case the profile has set it
    QtApplication {
        name: "unspecified-forced"
        files: "main.cpp"
        consoleApplication: true
        cpp.minimumWindowsVersion: undefined
        cpp.minimumOsxVersion: undefined
        cpp.minimumIosVersion: undefined
        cpp.minimumAndroidVersion: undefined

        Properties {
            condition: qbs.targetOS.contains("darwin")
            cpp.frameworks: "Foundation"
        }
    }

    // a specific version of the operating systems is specified
    // when the application is run its output should confirm
    // that the given values took effect
    QtApplication {
        condition: qbs.targetOS.contains("windows") || qbs.targetOS.contains("osx")
        name: "specific"
        files: "main.cpp"
        consoleApplication: true

        Properties {
            condition: qbs.targetOS.contains("windows")
            cpp.minimumWindowsVersion: "6.0"
        }

        Properties {
            condition: qbs.targetOS.contains("osx")
            cpp.frameworks: "Foundation"
            cpp.minimumOsxVersion: "10.6"
        }
    }

    // non-existent versions of Windows should print a QBS warning
    // (but will still compile and link since we avoid passing a
    // bad value to the linker)
    QtApplication {
        condition: qbs.targetOS.contains("windows")
        name: "fakewindows"
        files: "main.cpp"
        consoleApplication: true
        cpp.minimumWindowsVersion: "5.3"
    }

    // just to make sure three-digit minimum versions work on OS X
    // this only affects the value of __MAC_OS_X_VERSION_MIN_REQUIRED,
    // not the actual LC_VERSION_MIN_MACOSX command which is limited to two
    QtApplication {
        condition: qbs.targetOS.contains("osx")
        name: "macappstore"
        files: "main.cpp"
        consoleApplication: true
        cpp.frameworks: "Foundation"
        cpp.minimumOsxVersion: "10.6.8"
    }
}