|
1 | 1 | # Build Settings |
2 | 2 |
|
3 | | -## Special Types |
4 | | - |
5 | | -### `platform profile map` |
6 | | -- Type: `Platforms Map With Profiles Map` |
7 | | -- Description: A map of platforms with a map of profiles. |
8 | | - |
9 | | -??? TODO |
10 | | - If platform and profile are not specified, the default platform and profile are used. |
11 | | - |
12 | | -???+ Example |
13 | | - ```yaml |
14 | | - Windows: |
15 | | - "g++": |
16 | | - ExampleSetting: "ExampleValue" |
17 | | - Linux: |
18 | | - "g++": |
19 | | - ExampleSetting: "ExampleValue" |
20 | | - MacOS: |
21 | | - "g++": |
22 | | - ExampleSetting: "ExampleValue" |
23 | | - ``` |
24 | | - |
25 | | -### `platform profile list` |
26 | | -- Type: `Platforms Map With Profiles List` |
27 | | -- Description: A map of platforms with a list of profiles. |
28 | | - |
29 | | -???+ Example |
30 | | - ```yaml |
31 | | - Windows: ["g++", "msvc"] |
32 | | - Linux: ["g++"] |
33 | | - MacOS: ["g++"] |
34 | | - ``` |
35 | | - |
36 | 3 | ## Special Keywords |
37 | 4 |
|
38 | 5 | ### `DefaultPlatform` |
|
52 | 19 | - Optional: `true` |
53 | 20 | - Default: `false` |
54 | 21 | - Description: Whether to pass the script path as the second parameter when running in additional to the binary path. |
| 22 | + ??? example |
| 23 | + ```yaml |
| 24 | + PassScriptPath: false |
| 25 | + ``` |
55 | 26 | - `Language` |
56 | 27 | - Type: `string` |
57 | 28 | - Optional: `true` |
58 | 29 | - Default: Determined by file extension |
59 | 30 | - Description: The language of the script. |
| 31 | + ??? example |
| 32 | + ```yaml |
| 33 | + Language: "c++" |
| 34 | + ``` |
60 | 35 | - `BuildType` |
61 | 36 | - Type: `enum string`, can be one of the following: |
62 | 37 | - `Executable` |
|
66 | 41 | - Optional: `true` |
67 | 42 | - Default: `Executable` |
68 | 43 | - Description: The type of output to build. |
| 44 | + ??? example |
| 45 | + ```yaml |
| 46 | + BuildType: Executable |
| 47 | + ``` |
69 | 48 | - `RequiredProfiles` |
70 | 49 | - Type: `platform profile list` |
71 | 50 | - Optional: `true` |
72 | 51 | - Default: None |
73 | 52 | - Description: The profiles that are required for the script to be built. No profiles are required if this field is empty. |
| 53 | + ??? example |
| 54 | + ```yaml |
| 55 | + RequiredProfiles: |
| 56 | + Windows: ["g++"] |
| 57 | + Linux: ["g++"] |
| 58 | + MacOS: ["g++"] |
| 59 | + ``` |
74 | 60 | - `OverrideCompileFlags` |
75 | 61 | - Type: `platform profile map` |
76 | 62 | - Optional: `true` |
|
87 | 73 | - Optional: `true` |
88 | 74 | - Default: None |
89 | 75 | - Description: The compile flags to append for each platform and profile. |
| 76 | + ??? example |
| 77 | + ```yaml |
| 78 | + OverrideCompileFlags: |
| 79 | + DefaultPlatform: |
| 80 | + "g++": |
| 81 | + Remove: "-flagA -flagB" |
| 82 | + Append: "-flagC -flagD" |
| 83 | + ``` |
90 | 84 | - `OverrideLinkFlags` |
91 | 85 | - Type: `platform profile map` with child fields |
92 | 86 | - Optional: `true` |
|
103 | 97 | - Optional: `true` |
104 | 98 | - Default: None |
105 | 99 | - Description: The link flags to append for each platform and profile. |
| 100 | + ??? example |
| 101 | + ```yaml |
| 102 | + OverrideLinkFlags: |
| 103 | + DefaultPlatform: |
| 104 | + "g++": |
| 105 | + Remove: "-flagA -flagB" |
| 106 | + Append: "-flagC -flagD" |
| 107 | + ``` |
106 | 108 | - `OtherFilesToBeCompiled` |
107 | 109 | - Type: `platform profile map` with `list` of `string` |
108 | 110 | - Optional: `true` |
109 | 111 | - Default: None |
110 | 112 | - Description: The source files to be compiled for each platform and profile. |
| 113 | + ??? example |
| 114 | + ```yaml |
| 115 | + OtherFilesToBeCompiled: |
| 116 | + DefaultPlatform: |
| 117 | + DefaultProfile: |
| 118 | + - "./AnotherSourceFile.cpp" |
| 119 | + ``` |
111 | 120 | - `IncludePaths` |
112 | 121 | - Type: `platform profile map` with `list` of `string` |
113 | 122 | - Optional: `true` |
114 | 123 | - Default: None |
115 | 124 | - Description: The include paths to be used for each platform and profile. |
| 125 | + ??? example |
| 126 | + ```yaml |
| 127 | + IncludePaths: |
| 128 | + DefaultPlatform: |
| 129 | + DefaultProfile: |
| 130 | + - "./include" |
| 131 | + - "./src/include" |
| 132 | + ``` |
116 | 133 | - `Defines` |
117 | 134 | - Type: `platform profile map` with `list` of `string` |
118 | 135 | - Optional: `true` |
119 | 136 | - Default: None |
120 | 137 | - Description: The defines to be used for each platform and profile. |
| 138 | + ??? example |
| 139 | + ```yaml |
| 140 | + Defines: |
| 141 | + DefaultPlatform: |
| 142 | + DefaultProfile: |
| 143 | + - "EXAMPLE_DEFINE" # Define without a value |
| 144 | + - "VERSION_MAJOR=1" # Define with a value |
| 145 | + ``` |
121 | 146 | - `Setup` |
122 | 147 | - Type: `platform profile map` with `list` of `string` |
123 | 148 | - Optional: `true` |
124 | 149 | - Default: None |
125 | 150 | - Description: The setup commands to be used for each platform and profile. |
| 151 | + ??? example |
| 152 | + ```yaml |
| 153 | + Setup: |
| 154 | + DefaultPlatform: |
| 155 | + DefaultProfile: |
| 156 | + - "echo Setting up script..." |
| 157 | + ``` |
126 | 158 | - `PreBuild` |
127 | 159 | - Type: `platform profile map` with `list` of `string` |
128 | 160 | - Optional: `true` |
129 | 161 | - Default: None |
130 | 162 | - Description: The pre-build commands to be used for each platform and profile. |
| 163 | + ??? example |
| 164 | + ```yaml |
| 165 | + PreBuild: |
| 166 | + DefaultPlatform: |
| 167 | + DefaultProfile: |
| 168 | + - "echo Starting build..." |
| 169 | + ``` |
131 | 170 | - `PostBuild` |
132 | 171 | - Type: `platform profile map` with `list` of `string` |
133 | 172 | - Optional: `true` |
134 | 173 | - Default: None |
135 | 174 | - Description: The post-build commands to be used for each platform and profile. |
| 175 | + ??? example |
| 176 | + ```yaml |
| 177 | + PostBuild: |
| 178 | + DefaultPlatform: |
| 179 | + DefaultProfile: |
| 180 | + - "echo Build completed..." |
| 181 | + ``` |
136 | 182 | - `Cleanup` |
137 | 183 | - Type: `platform profile map` with `list` of `string` |
138 | 184 | - Optional: `true` |
139 | 185 | - Default: None |
140 | 186 | - Description: The cleanup commands to be used for each platform and profile. |
| 187 | + ??? example |
| 188 | + ```yaml |
| 189 | + Cleanup: |
| 190 | + DefaultPlatform: |
| 191 | + DefaultProfile: |
| 192 | + - "echo Cleaning up script..." |
| 193 | + ``` |
141 | 194 | - `Dependencies` |
142 | 195 | - Type: `list` of `dependency entry` |
143 | 196 | - Optional: `true` |
144 | 197 | - Default: None |
145 | 198 | - Description: The dependencies to be used for each platform and profile. |
| 199 | + ??? example |
| 200 | + ```yaml |
| 201 | + Dependencies: |
| 202 | + - Name: MyLibrary |
| 203 | + Platforms: [Windows, Linux, MacOS] |
| 204 | + Source: |
| 205 | + # ImportPath: "config/dependency.yaml" |
| 206 | + Git: |
| 207 | + URL: "https://github.com/MyUser/MyLibrary.git" |
| 208 | + # Local: |
| 209 | + # Path: "./libs/LocalLibrary" |
| 210 | + # CopyMode: "Auto" |
| 211 | + LibraryType: Static |
| 212 | + IncludePaths: |
| 213 | + - "src/include" |
| 214 | + LinkProperties: |
| 215 | + DefaultPlatform: |
| 216 | + "g++": |
| 217 | + SearchLibraryNames: ["MyLibrary"] |
| 218 | + ExcludeLibraryNames: [] |
| 219 | + SearchDirectories: ["./build"] |
| 220 | + AdditionalLinkOptions: [] |
| 221 | + Setup: |
| 222 | + DefaultPlatform: |
| 223 | + "g++": |
| 224 | + - "mkdir build" |
| 225 | + Build: |
| 226 | + DefaultPlatform: |
| 227 | + "g++": |
| 228 | + - "cd build && cmake .." |
| 229 | + - "cd build && cmake --build ." |
| 230 | + Cleanup: |
| 231 | + Linux: |
| 232 | + "g++": |
| 233 | + - "sudo apt purge MyLibrary" |
| 234 | + FilesToCopy: |
| 235 | + DefaultPlatform: |
| 236 | + DefaultProfile: |
| 237 | + - "assets/textures/sprite.png" |
| 238 | + Windows: |
| 239 | + "msvc": |
| 240 | + - "assets/textures/sprite.png" |
| 241 | + - "assets/fonts/windows_specific_font.ttf" |
| 242 | + Linux: |
| 243 | + "g++": |
| 244 | + - "assets/textures/sprite.png" |
| 245 | + - "assets/shaders/linux_optimized_shader.glsl" |
| 246 | + ``` |
| 247 | +## Special Types |
| 248 | + |
| 249 | +### `platform profile map` |
| 250 | +- Type: `Platforms Map With Profiles Map` |
| 251 | +- Description: A map of platforms with a map of profiles. |
| 252 | + |
| 253 | +??? TODO |
| 254 | + If platform and profile are not specified, the default platform and profile are used. |
| 255 | + |
| 256 | +???+ Example |
| 257 | + ```yaml |
| 258 | + Windows: |
| 259 | + "g++": |
| 260 | + ExampleSetting: "ExampleValue" |
| 261 | + Linux: |
| 262 | + "g++": |
| 263 | + ExampleSetting: "ExampleValue" |
| 264 | + MacOS: |
| 265 | + "g++": |
| 266 | + ExampleSetting: "ExampleValue" |
| 267 | + ``` |
| 268 | + |
| 269 | +### `platform profile list` |
| 270 | +- Type: `Platforms Map With Profiles List` |
| 271 | +- Description: A map of platforms with a list of profiles. |
| 272 | + |
| 273 | +???+ Example |
| 274 | + ```yaml |
| 275 | + Windows: ["g++", "msvc"] |
| 276 | + Linux: ["g++"] |
| 277 | + MacOS: ["g++"] |
| 278 | + ``` |
146 | 279 |
|
147 | 280 | ### `dependency entry` |
148 | 281 | - Type: `map` |
|
205 | 338 | - `Object` |
206 | 339 | - `Shared` |
207 | 340 | - `Header` |
| 341 | + - Optional: `true`, only if `Source.ImportPath` is specified |
| 342 | + - Default: None |
| 343 | + - Description: The type of this dependency |
208 | 344 | - `IncludePaths` |
209 | 345 | - Type: `list` of `string` |
210 | 346 | - Optional: `true` |
211 | 347 | - Default: None |
212 | 348 | - Description: The include paths to be used for the dependency. |
213 | 349 | - `LinkProperties` |
214 | 350 | - Type: `map` with child fields |
215 | | - - Optional: `true` if `LibraryType` is `Header` |
| 351 | + - Optional: `true` if `LibraryType` is `Header` or `Source.ImportPath` is specified |
216 | 352 | - Default: None |
217 | 353 | - Description: The link properties to be used for the dependency. |
218 | 354 | - Child Fields: |
|
257 | 393 | - Default: None |
258 | 394 | - Description: The files to be copied to the output directory for each platform and profile. |
259 | 395 |
|
260 | | - |
261 | | - |
262 | 396 | ## Template |
263 | 397 |
|
264 | 398 | ```yaml |
|
0 commit comments