Fix modules support in xmake.lua

This commit is contained in:
keqingmoe 2025-06-22 12:44:06 +08:00
parent d924b84eba
commit f18ab101d7

View File

@ -31,12 +31,15 @@ target("argparse", function()
set_kind("static") -- static atm because of a XMake bug, headeronly doesn't generate package module metadata set_kind("static") -- static atm because of a XMake bug, headeronly doesn't generate package module metadata
end 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_includedirs("include", { public = true })
add_headerfiles("include/argparse/argparse.hpp") add_headerfiles("include/argparse/argparse.hpp")
add_headerfiles("include/(argparse/argparse.hpp)")
if get_config("enable_module") then if get_config("enable_module") then
add_files("module/argparse.cppm", { install = true }) add_files("module/argparse.cppm", { public = true, install = true })
end end
end) end)