summaryrefslogtreecommitdiff
path: root/xmake.lua
diff options
context:
space:
mode:
authorOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-03-30 23:15:36 +1100
committerOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-03-30 23:15:36 +1100
commitf26f084958550cd01b9e4e4b098551520a4c6852 (patch)
tree1b835288f94461ba86aca8cff723d3364556db52 /xmake.lua
parentb4cb698d177ada97c976eab059eabedd433abfd0 (diff)
parentc20740ecbb008afbe93c7fa1eb35851cedc6eb42 (diff)
Merge branch 'cel-60-scaffold-vulkan' into cleanroom-vulkan
Diffstat (limited to 'xmake.lua')
-rw-r--r--xmake.lua22
1 files changed, 15 insertions, 7 deletions
diff --git a/xmake.lua b/xmake.lua
index 5457ccb..29c1de0 100644
--- a/xmake.lua
+++ b/xmake.lua
@@ -14,6 +14,7 @@ add_cflags("-Wall", "-Wextra", "-Wundef", "-Wdouble-promotion")
if is_mode("debug") then
add_cflags("-g") -- Add debug symbols in debug mode
+ add_defines("CDEBUG")
elseif is_mode("release") then
add_defines("CRELEASE")
end
@@ -68,18 +69,18 @@ rule("compile_glsl_vert_shaders")
on_buildcmd_file(function (target, batchcmds, sourcefile, opt)
local targetfile = path.join(target:targetdir(), path.basename(sourcefile) .. ".vert.spv")
- print("Compiling shader: %s", sourcefile)
+ print("Compiling shader: %s to %s", sourcefile, targetfile)
batchcmds:vrunv('glslc', {sourcefile, "-o", targetfile})
- batchcmds:add_depfiles(sourcefile)
+ -- batchcmds:add_depfiles(sourcefile)
end)
rule("compile_glsl_frag_shaders")
set_extensions(".frag")
on_buildcmd_file(function (target, batchcmds, sourcefile, opt)
local targetfile = path.join(target:targetdir(), path.basename(sourcefile) .. ".frag.spv")
- print("Compiling shader: %s", sourcefile)
+ print("Compiling shader: %s to %s", sourcefile, targetfile)
batchcmds:vrunv('glslc', {sourcefile, "-o", targetfile})
- batchcmds:add_depfiles(sourcefile)
+ -- batchcmds:add_depfiles(sourcefile)
end)
-- TODO: Metal shaders compilation
@@ -103,11 +104,11 @@ target("core_config")
add_includedirs("src/std/", {public = true})
add_includedirs("src/std/containers", {public = true})
add_includedirs("src/systems/", {public = true})
+ add_files("src/empty.c") -- for some reason we need this on Mac so it doesnt call 'ar' with no files and error
add_rules("compile_glsl_vert_shaders")
add_rules("compile_glsl_frag_shaders")
- add_files("src/empty.c") -- for some reason we need this on Mac so it doesnt call 'ar' with no files and error
- add_files("assets/shaders/triangle.vert")
- add_files("assets/shaders/triangle.frag")
+ add_files("assets/shaders/object.vert")
+ add_files("assets/shaders/object.frag")
-- add_files("assets/shaders/*.frag")
set_default(false) -- prevents standalone building of this target
@@ -143,6 +144,13 @@ target("obj")
add_files("examples/obj_loading/ex_obj_loading.c")
set_rundir("$(projectdir)")
+target("input")
+ set_kind("binary")
+ set_group("examples")
+ add_deps("core_static")
+ add_files("examples/input/ex_input.c")
+ set_rundir("$(projectdir)")
+
target("demo")
set_kind("binary")
set_group("examples")