From 1664718b82cc561d4395d327172f57c9adb7bed8 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 1 Feb 2023 13:57:21 +0800 Subject: [PATCH] add libui (#1772) * Added libui * Fixed issues * Fix issues * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * add glib * add gtk3 on ci * fix glib * revert ci --------- Co-authored-by: Amrit Bhogal --- packages/l/libui/xmake.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 packages/l/libui/xmake.lua diff --git a/packages/l/libui/xmake.lua b/packages/l/libui/xmake.lua new file mode 100644 index 000000000..6e1dd3284 --- /dev/null +++ b/packages/l/libui/xmake.lua @@ -0,0 +1,26 @@ +package("libui") + set_homepage("https://libui-ng.github.io/libui-ng/") + set_description("A portable GUI library for C") + + set_urls("https://github.com/libui-ng/libui-ng.git") + add_versions("2022.12.3", "8c82e737eea2f8ab3667e227142abd2fd221f038") + + add_deps("meson", "ninja") + + if is_plat("macosx") then + add_frameworks("CoreGraphics", "CoreText", "Foundation", "AppKit") + elseif is_plat("windows") then + add_syslinks("user32", "ole32", "gdi32", "d2d1", "dwrite", "comctl32", "windowscodecs") + elseif is_plat("linux") then + add_deps("gtk+3", "glib") + end + + on_install("linux", "macosx", "windows", function (package) + local configs = {"-Dexamples=false", "-Dtests=false"} + table.insert(configs, "--default-library=" .. (package:config("shared") and "shared" or "static")) + import("package.tools.meson").install(package, configs) + end) + + on_test(function (package) + assert(package:has_cfuncs("uiInit", {includes = "ui.h"})) + end)