d1c77edbb15e22121347f1bb46a472d0148029fc
[WebKit-https.git] / Tools / TestWebKitAPI / Configurations / macOSTargetConditionals.xcconfig
1 // Copyright (C) 2018 Apple Inc. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions
5 // are met:
6 // 1. Redistributions of source code must retain the above copyright
7 //    notice, this list of conditions and the following disclaimer.
8 // 2. Redistributions in binary form must reproduce the above copyright
9 //    notice, this list of conditions and the following disclaimer in the
10 //    documentation and/or other materials provided with the distribution.
11 //
12 // THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
13 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15 // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
16 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
17 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
18 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
19 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
20 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
24 // Use the following helpers to define build settings whose value depends on the target
25 // macOS version in a succinct and future-proof way.
26 //
27 // Example 1: To give the SMOOTHNESS build setting the value 3 in macOS 10.12 and later and the
28 // value 2 in earlier versions, write:
29 //
30 //     SMOOTHNESS = $(SMOOTHNESS$(WK_MACOS_1012));
31 //     SMOOTHNESS_MACOS_BEFORE_1012 = 2;
32 //     SMOOTHNESS_MACOS_SINCE_1012 = 3;
33 //
34 // Example 2: To define ENABLE_COLOR to ENABLE_COLOR in all platforms except macOS 10.12 and
35 // earlier write:
36 //
37 //     ENABLE_COLOR = ENABLE_COLOR;
38 //     ENABLE_COLOR[sdk=macosx*] = $(ENABLE_COLOR$(WK_MACOS_1013));
39 //     ENABLE_COLOR_MACOS_SINCE_1013 = $(ENABLE_COLOR);
40 //
41 // Example 3: To give EXTRA_PATH one value before macOS 10.12, another value in macOS 10.12 and
42 // macOS 10.13, and a third value in macOS 10.14 and later, write:
43 //
44 //     EXTRA_PATH = $(EXTRA_PATH$(WK_MACOS_1012_1014));
45 //     EXTRA_PATH_MACOS_BEFORE_1012 = "/Library/Application Support/WebKit";
46 //     EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
47 //     EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
48
49 WK_MACOS_BEFORE_1012 = $(WK_MACOS_BEFORE_1012_$(TARGET_MAC_OS_X_VERSION_MAJOR));
50 WK_MACOS_BEFORE_1012_101100 = YES;
51
52 WK_MACOS_BEFORE_1013 = $(WK_MACOS_BEFORE_1013_$(TARGET_MAC_OS_X_VERSION_MAJOR));
53 WK_MACOS_BEFORE_1013_101100 = YES;
54 WK_MACOS_BEFORE_1013_101200 = YES;
55
56 WK_MACOS_BEFORE_1014 = $(WK_MACOS_BEFORE_1014_$(TARGET_MAC_OS_X_VERSION_MAJOR));
57 WK_MACOS_BEFORE_1014_101100 = YES;
58 WK_MACOS_BEFORE_1014_101200 = YES;
59 WK_MACOS_BEFORE_1014_101300 = YES;
60
61 WK_MACOS_BEFORE_1015 = $(WK_MACOS_BEFORE_1015_$(TARGET_MAC_OS_X_VERSION_MAJOR));
62 WK_MACOS_BEFORE_1015_101100 = YES;
63 WK_MACOS_BEFORE_1015_101200 = YES;
64 WK_MACOS_BEFORE_1015_101300 = YES;
65 WK_MACOS_BEFORE_1015_101400 = YES;
66
67 WK_MACOS_1012 = $(WK_MACOS_1012_$(WK_MACOS_BEFORE_1012));
68 WK_MACOS_1012_ = _MACOS_SINCE_1012;
69 WK_MACOS_1012_YES = _MACOS_BEFORE_1012;
70
71 WK_MACOS_1012_1013 = $(WK_MACOS_1012_1013_$(WK_MACOS_BEFORE_1012));
72 WK_MACOS_1012_1013_ = $(WK_MACOS_1013);
73 WK_MACOS_1012_1013_YES = _MACOS_BEFORE_1012;
74
75 WK_MACOS_1012_1014 = $(WK_MACOS_1012_1014_$(WK_MACOS_BEFORE_1012));
76 WK_MACOS_1012_1014_ = $(WK_MACOS_1014);
77 WK_MACOS_1012_1014_YES = _MACOS_BEFORE_1012;
78
79 WK_MACOS_1012_1015 = $(WK_MACOS_1012_1015_$(WK_MACOS_BEFORE_1012));
80 WK_MACOS_1012_1015_ = $(WK_MACOS_1015);
81 WK_MACOS_1012_1015_YES = _MACOS_BEFORE_1012;
82
83 WK_MACOS_1013 = $(WK_MACOS_1013_$(WK_MACOS_BEFORE_1013));
84 WK_MACOS_1013_ = _MACOS_SINCE_1013;
85 WK_MACOS_1013_YES = _MACOS_BEFORE_1013;
86
87 WK_MACOS_1013_1014 = $(WK_MACOS_1013_1014_$(WK_MACOS_BEFORE_1013));
88 WK_MACOS_1013_1014_ = $(WK_MACOS_1014);
89 WK_MACOS_1013_1014_YES = _MACOS_BEFORE_1013;
90
91 WK_MACOS_1013_1015 = $(WK_MACOS_1013_1015_$(WK_MACOS_BEFORE_1013));
92 WK_MACOS_1013_1015_ = $(WK_MACOS_1015);
93 WK_MACOS_1013_1015_YES = _MACOS_BEFORE_1013;
94
95 WK_MACOS_1014 = $(WK_MACOS_1014_$(WK_MACOS_BEFORE_1014));
96 WK_MACOS_1014_ = _MACOS_SINCE_1014;
97 WK_MACOS_1014_YES = _MACOS_BEFORE_1014;
98
99 WK_MACOS_1014_1015 = $(WK_MACOS_1014_1015_$(WK_MACOS_BEFORE_1014));
100 WK_MACOS_1014_1015_ = $(WK_MACOS_1015);
101 WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
102
103 WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
104 WK_MACOS_1015_ = _MACOS_SINCE_1015;
105 WK_MACOS_1015_YES = _MACOS_BEFORE_1015;