diff options
Diffstat (limited to 'third_party/packages/t/tinyfiledialogs/xmake.lua')
-rw-r--r-- | third_party/packages/t/tinyfiledialogs/xmake.lua | 35 |
1 files changed, 35 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 |