annotate config.nims @ 22:b45a5d338cd0

did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
author Sam <sam@basx.dev>
date Wed, 11 Jan 2023 00:43:17 +0700
parents 316923e9247c
children 71bbe11d8de8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
1 import os
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
2
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
3 const buildbase = "build"
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
4
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
5 proc compilerFlags() =
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
6 switch("path", "src")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
7 switch("mm", "orc")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
8 switch("experimental", "strictEffects")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
9 switch("threads", "on")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
10 switch("app", "gui")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
11
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
12 proc compilerFlagsDebug() =
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
13 switch("debugger", "native")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
14 switch("checks", "on")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
15 switch("assertions", "on")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
16
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
17 proc compilerFlagsRelease() =
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
18 switch("define", "release")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
19 switch("checks", "off")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
20 switch("assertions", "off")
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
21
21
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
22 proc compilerFlagsDebugWindows() =
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
23 switch("cc", "vcc")
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
24 switch("passC", "/MDd")
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
25 switch("passL", "ucrtd.lib")
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
26
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
27 proc compilerFlagsReleaseWindows() =
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
28 switch("cc", "vcc")
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
29 switch("passC", "/MD")
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
30 switch("passL", "ucrt.lib")
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
31
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
32 task build_linux_debug, "build linux debug":
21
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
33 compilerFlags()
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
34 compilerFlagsDebug()
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
35 buildbase.joinPath("debug/linux").mkDir()
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
36 setCommand "c"
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
37
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
38 task build_linux_release, "build linux release":
21
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
39 compilerFlags()
18
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
40 compilerFlagsRelease()
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
41 buildbase.joinPath("release/linux").mkDir()
90e117952f74 add: basic vertex buffer functionality
Sam <sam@basx.dev>
parents: 13
diff changeset
42 setCommand "c"
19
b55d6ecde79d did: introduce scene graph, meshs and generic vertex buffers
Sam <sam@basx.dev>
parents: 18
diff changeset
43
21
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
44 task build_windows_debug, "build windows debug":
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
45 compilerFlags()
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
46 compilerFlagsDebug()
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
47 # compilerFlagsDebugWindows()
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
48 switch("define", "mingw")
21
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
49 buildbase.joinPath("debug/windows").mkDir()
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
50 setCommand "c"
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
51
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
52 task build_windows_release, "build windows release":
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
53 compilerFlags()
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
54 compilerFlagsRelease()
22
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
55 # compilerFlagsReleaseWindows()
b45a5d338cd0 did: improve alotof_triangles example, remove glslang lib, use only binary, easier cross-compilation
Sam <sam@basx.dev>
parents: 21
diff changeset
56 switch("define", "mingw")
21
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
57 buildbase.joinPath("release/windows").mkDir()
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
58 setCommand "c"
316923e9247c add: clean examples, update build configs
Sam <sam@basx.dev>
parents: 19
diff changeset
59
19
b55d6ecde79d did: introduce scene graph, meshs and generic vertex buffers
Sam <sam@basx.dev>
parents: 18
diff changeset
60 compilerFlags()