summaryrefslogtreecommitdiff
path: root/third_party/packages/t/tinyfiledialogs/xmake.lua
diff options
context:
space:
mode:
authorMole Shang <[email protected]>2024-03-01 21:51:47 +0800
committerMole Shang <[email protected]>2024-03-01 22:30:17 +0800
commit2c23cf4b3968a2c4f86253dcadba9779bc00e6ff (patch)
treeaba464b31c64045e1a661488e63c511ceb88793f /third_party/packages/t/tinyfiledialogs/xmake.lua
parent085c2a88d44ebac41c64c32ee6b796ff64e5331f (diff)
downloadhinata-2c23cf4b3968a2c4f86253dcadba9779bc00e6ff.tar.gz
hinata-2c23cf4b3968a2c4f86253dcadba9779bc00e6ff.tar.bz2
hinata-2c23cf4b3968a2c4f86253dcadba9779bc00e6ff.zip
xmake: move deps to third_party dir
Diffstat (limited to 'third_party/packages/t/tinyfiledialogs/xmake.lua')
-rw-r--r--third_party/packages/t/tinyfiledialogs/xmake.lua35
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