From f18ab101d7477f0830ad34e99aae728684bf7604 Mon Sep 17 00:00:00 2001 From: keqingmoe Date: Sun, 22 Jun 2025 12:44:06 +0800 Subject: [PATCH] Fix modules support in xmake.lua --- xmake.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xmake.lua b/xmake.lua index 82c4d2f..fbcfccf 100644 --- a/xmake.lua +++ b/xmake.lua @@ -31,12 +31,15 @@ target("argparse", function() set_kind("static") -- static atm because of a XMake bug, headeronly doesn't generate package module metadata end - add_options("enable_std_import") + if get_config("enable_std_import") then + add_defines("ARGPARSE_MODULE_USE_STD_MODULE") + end add_includedirs("include", { public = true }) add_headerfiles("include/argparse/argparse.hpp") + add_headerfiles("include/(argparse/argparse.hpp)") if get_config("enable_module") then - add_files("module/argparse.cppm", { install = true }) + add_files("module/argparse.cppm", { public = true, install = true }) end end)