changeset 848:42c680897aab

fix: move switches into our engine-build-func
author Sam <sam@basx.dev>
date Sun, 03 Dec 2023 01:48:55 +0700
parents 85d69fa69faa
children c241b9e9a976
files semicongine/build.nim
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)