summaryrefslogtreecommitdiff
path: root/core/xmake.lua
diff options
context:
space:
mode:
authortqfx <[email protected]>2024-05-24 22:39:12 +0800
committertqfx <[email protected]>2024-05-26 21:45:46 +0800
commit1d6f7c99f8c7992e2eb7cd99bb7eb6aa309bb314 (patch)
tree2fa78116390103b9b80e3b80adeab13b19eefd8f /core/xmake.lua
parent4cdcaa4772957ab2672d2618ca11e1dcce0e71c2 (diff)
Fix building xmake using xmake on mingw
Diffstat (limited to 'core/xmake.lua')
-rw-r--r--core/xmake.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/core/xmake.lua b/core/xmake.lua
index e14961d08..b64953ad7 100644
--- a/core/xmake.lua
+++ b/core/xmake.lua
@@ -65,7 +65,7 @@ option_end()
option("readline")
set_description("Enable or disable readline library")
add_links("readline")
- add_cincludes("readline/readline.h")
+ add_cincludes("stdio.h", "readline/readline.h")
add_cfuncs("readline")
add_defines("XM_CONFIG_API_HAVE_READLINE")
option_end()
@@ -73,8 +73,15 @@ option_end()
-- the curses option
option("curses")
set_description("Enable or disable curses library")
- add_links("curses")
- add_cincludes("curses.h")
+ before_check(function (option)
+ if is_plat("mingw") then
+ option:add("cincludes", "ncursesw/curses.h")
+ option:add("links", "ncursesw")
+ else
+ option:add("cincludes", "curses.h")
+ option:add("links", "curses")
+ end
+ end)
add_defines("XM_CONFIG_API_HAVE_CURSES")
option_end()