Mercurial > games > semicongine
view semiconginev2/core/buildconfig.nim @ 1223:55896320c8bf compiletime-tests
fix: references to new package not updated
author | sam <sam@basx.dev> |
---|---|
date | Wed, 17 Jul 2024 21:13:54 +0700 |
parents | 56781cc0fc7c |
children | c8e3037aca66 |
line wrap: on
line source
const ENGINENAME = "semiconginev2" # checks required build options: static: if defined(linux): assert defined(VK_USE_PLATFORM_XLIB_KHR), ENGINENAME & " requires --d:VK_USE_PLATFORM_XLIB_KHR for linux builds" elif defined(windows): assert defined(VK_USE_PLATFORM_WIN32_KHR), ENGINENAME & " requires --d:VK_USE_PLATFORM_WIN32_KHR for windows builds" else: assert false, "trying to build on unsupported platform" # build configuration # ===================== # compile-time defines, usefull for build-dependent settings # can be overriden with compiler flags, e.g. -d:Foo=42 -d:Bar=false # pramas: {.intdefine.} {.strdefine.} {.booldefine.} # root of where settings files will be searched # must be relative (to the directory of the binary) const DEBUG* {.booldefine.} = not defined(release) const CONFIGROOT* {.strdefine.}: string = "." assert not isAbsolute(CONFIGROOT) const CONFIGEXTENSION* {.strdefine.}: string = "ini" # by default enable hot-reload of runtime-configuration only in debug builds const CONFIGHOTRELOAD* {.booldefine.}: bool = DEBUG # milliseconds to wait between checks for settings hotreload const CONFIGHOTRELOADINTERVAL* {.intdefine.}: int = 1000 # log level const LOGLEVEL {.strdefine.}: string = "Warn" const ENGINE_LOGLEVEL* = parseEnum[Level]("lvl" & LOGLEVEL) # resource bundleing settings, need to be configured per project const PACKAGETYPE* {.strdefine.}: string = "exe" # dir, zip, exe static: assert PACKAGETYPE in ["dir", "zip", "exe"], ENGINENAME & " requires one of -d:PACKAGETYPE=dir -d:PACKAGETYPE=zip -d:PACKAGETYPE=exe"