Skip to content

Commit

Permalink
Add renderer configuration options and update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Arteiimis committed Dec 27, 2024
1 parent e56559c commit 995eb7c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/c/clay/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,24 @@ package("clay")

add_versions("v0.12", "b36f19352635edeb6d770fe77fab267982d9f206beb541849578de9f0aaff825")

add_configs("renderer", {description = "Enable renderer", default = true, type = "boolean"})

on_install(function (package)
os.cp("clay.h", package:installdir("include"))
os.cp("renderers/", package:installdir("include", "renderers"), {rootdir = "renderers"})
end)

on_test(function (package)
assert(package:has_cxxincludes("clay.h", {configs = {languages = "c++20"}}))
if package:config("renderer") then
assert(package:check_cxxsnippets({test = [[
#define CLAY_IMPLEMENTATION
#include "clay.h"
#include "renderers/raylib/clay_renderer_raylib.c"
void test() {
BeginDrawing();
EndDrawing();
}
]]}, {configs = {languages = "c++20"}}))
end
end)

0 comments on commit 995eb7c

Please sign in to comment.