# HG changeset patch # User Sam # Date 1701542935 -25200 # Node ID 42c680897aab61dec705d819ae61385593504802 # Parent 85d69fa69faadb1925b3520dcadac654a06db2f0 fix: move switches into our engine-build-func diff -r 85d69fa69faa -r 42c680897aab semicongine/build.nim --- a/semicongine/build.nim Sun Dec 03 01:02:42 2023 +0700 +++ b/semicongine/build.nim Sun Dec 03 01:48:55 2023 +0700 @@ -1,11 +1,13 @@ import std/strformat import std/os -proc semicongine_build*(buildType: string, bundleType: string, resourceRoot="resources", builddir="./build"): string = +proc semicongine_build*(buildname: string, bundleType: string, resourceRoot: string, builddir="./build"): string = switch("experimental", "strictEffects") switch("experimental", "strictFuncs") switch("define", "nimPreviewHashRef") + switch("define", &"BUNDLETYPE={bundleType}") + switch("define", &"RESOURCEROOT={resourceRoot}") var platformDir = "unkown" if defined(linux): @@ -15,7 +17,7 @@ switch("define", "VK_USE_PLATFORM_WIN32_KHR") platformDir = "windows" - var outdir = builddir / buildType / platformDir / projectName() + var outdir = builddir / buildname / platformDir / projectName() switch("outdir", outdir) setCommand "c" rmDir(outdir)