-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.nims
44 lines (39 loc) · 883 Bytes
/
make.nims
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import std/[os,strutils]
var projDirs = @[
"glfw_opengl3",
"glfw_opengl3_base",
"glfw_opengl3_filedialog",
"glfw_opengl3_iconfont_viewer",
"glfw_opengl3_image_load",
"glfw_opengl3_image_save",
"glfw_opengl3_imgui_toggle",
"glfw_opengl3_implot",
"glfw_opengl3_imguizmo",
"glfw_opengl3_imknobs",
"glfw_opengl3_imnodes",
"glfw_opengl3_jp",
"sdl2_opengl3",
"sdl2_renderer",
"fontx2v",
]
when defined(windows):
projDirs.add "sdl3_opengl3"
projDirs.add "sdl3_renderer"
#-------------
# compileProj
#-------------
proc compileProj(cmd:string) =
var options = ""
for dir in projDirs:
if dir.dirExists:
withDir(dir):
if cmd == "clean":
options = join([options,"--no-print-directory"]," ")
exec("make $# $#" % [options,cmd])
#------
# main
#------
var cmd:string
if commandLineParams().len >= 2:
cmd = commandLineParams()[1]
compileProj(cmd)