diff options
Diffstat (limited to 'third_party/packages/t')
-rw-r--r-- | third_party/packages/t/tinyfiledialogs/xmake.lua | 35 | ||||
-rw-r--r-- | third_party/packages/t/tomlc99/xmake.lua | 22 |
2 files changed, 57 insertions, 0 deletions
diff --git a/third_party/packages/t/tinyfiledialogs/xmake.lua b/third_party/packages/t/tinyfiledialogs/xmake.lua new file mode 100644 index 0000000..72dcca1 --- /dev/null +++ b/third_party/packages/t/tinyfiledialogs/xmake.lua @@ -0,0 +1,35 @@ +package("tinyfiledialogs") + +set_homepage("https://sourceforge.net/projects/tinyfiledialogs/") +set_description("Native dialog library for WINDOWS MAC OSX GTK+ QT CONSOLE") +set_license("zlib") + +add_urls("https://git.code.sf.net/p/tinyfiledialogs/code.git") + +if is_plat("windows", "mingw") then + add_syslinks("comdlg32", "ole32", "user32", "shell32") +end +on_install("windows", "mingw", "linux", "macosx", function(package) + io.writefile("xmake.lua", [[ + add_rules("mode.debug", "mode.release") + target("tinyfiledialogs") + set_kind("static") + add_files("tinyfiledialogs.c") + add_headerfiles("tinyfiledialogs.h") + ]]) + import("package.tools.xmake").install(package) +end) + +on_test(function(package) + assert(package:check_csnippets({ + test = [[ + #include <stdio.h> + #include <string.h> + #include "tinyfiledialogs.h" + void test() { + char const * lWillBeGraphicMode; + lWillBeGraphicMode = tinyfd_inputBox("tinyfd_query", NULL, NULL); + } + ]] + })) +end)
\ No newline at end of file diff --git a/third_party/packages/t/tomlc99/xmake.lua b/third_party/packages/t/tomlc99/xmake.lua new file mode 100644 index 0000000..2cc22b6 --- /dev/null +++ b/third_party/packages/t/tomlc99/xmake.lua @@ -0,0 +1,22 @@ +package("tomlc99") + +set_homepage("https://github.com/cktan/tomlc99") +set_description("TOML C library ") +set_license("MIT") + +set_urls("https://github.com/cktan/tomlc99.git") + +on_install("linux", "macosx", "windows", "mingw", function(package) + io.writefile("xmake.lua", [[ + add_rules("mode.debug", "mode.release") + target("tomlc99") + set_kind("static") + add_files("toml.c") + add_headerfiles("toml.h") + ]]) + import("package.tools.xmake").install(package) +end) + +on_test(function(package) + assert(package:has_cfuncs("toml_parse_file", { includes = "toml.h" })) +end) |