annotate semiconginev2/core/buildconfig.nim @ 1243:7e55fde39ca8

did: prepare for gltf importer and cleanup old engine code
author sam <sam@basx.dev>
date Mon, 22 Jul 2024 17:49:48 +0700
parents c8e3037aca66
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1223
55896320c8bf fix: references to new package not updated
sam <sam@basx.dev>
parents: 1218
diff changeset
1 const ENGINENAME = "semiconginev2"
840
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
2
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
3 # checks required build options:
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
4 static:
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
5 if defined(linux):
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
6 assert defined(VK_USE_PLATFORM_XLIB_KHR), ENGINENAME & " requires --d:VK_USE_PLATFORM_XLIB_KHR for linux builds"
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
7 elif defined(windows):
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
8 assert defined(VK_USE_PLATFORM_WIN32_KHR), ENGINENAME & " requires --d:VK_USE_PLATFORM_WIN32_KHR for windows builds"
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
9 else:
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
10 assert false, "trying to build on unsupported platform"
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
11
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
12 # build configuration
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
13 # =====================
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
14
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
15 # log level
932
c7f37ab146e4 fix: wrong value for default log level
sam <sam@basx.dev>
parents: 931
diff changeset
16 const LOGLEVEL {.strdefine.}: string = "Warn"
931
8fee76740f95 fix: ugly log-level directive
sam <sam@basx.dev>
parents: 920
diff changeset
17 const ENGINE_LOGLEVEL* = parseEnum[Level]("lvl" & LOGLEVEL)
840
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
18
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
19 # resource bundleing settings, need to be configured per project
1172
sam <sam@basx.dev>
parents: 1022
diff changeset
20 const PACKAGETYPE* {.strdefine.}: string = "exe" # dir, zip, exe
840
44ec744fbedc did: package restructuring according to nimble recommendation for libraries
Sam <sam@basx.dev>
parents:
diff changeset
21 static:
899
ad961543994b did: refactor and improve packaging API
Sam <sam@basx.dev>
parents: 861
diff changeset
22 assert PACKAGETYPE in ["dir", "zip", "exe"], ENGINENAME & " requires one of -d:PACKAGETYPE=dir -d:PACKAGETYPE=zip -d:PACKAGETYPE=exe"