Skip to content

Commit

Permalink
chore: support client mod build
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN committed Aug 13, 2024
1 parent 22fa196 commit e0e9546
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,40 @@ add_repositories("liteldev-repo https://github.com/LiteLDev/xmake-repo.git")
-- add_requires("levilamina x.x.x") for a specific version
-- add_requires("levilamina develop") to use develop version
-- please note that you should add bdslibrary yourself if using dev version
add_requires("levilamina develop")
if is_config("target_type", "server") then
add_requires("levilamina develop", {configs = {target_type = "server"}})
else
add_requires("levilamina develop", {configs = {target_type = "client"}})
end

add_requires("levibuildscript")

if not has_config("vs_runtime") then
set_runtimes("MD")
end

option("target_type")
set_default("server")
set_showmenu(true)
set_values("server", "client")
option_end()

target("my-mod") -- Change this to your mod name.
add_rules("@levibuildscript/linkrule")
add_rules("@levibuildscript/modpacker")
add_cxflags(
"/EHa",
"/utf-8",
"/W4",
"/w44265",
"/w44289",
"/w44296",
"/w45263",
"/w44738",
"/w45204"
)
add_cxflags( "/EHa", "/utf-8", "/W4", "/w44265", "/w44289", "/w44296", "/w45263", "/w44738", "/w45204")
add_defines("NOMINMAX", "UNICODE")
add_files("src/**.cpp")
add_includedirs("src")
add_packages("levilamina")
set_exceptions("none") -- To avoid conflicts with /EHa.
set_kind("shared")
set_languages("c++20")
set_symbols("debug")
add_files("src/**.cpp")
add_includedirs("src")
-- if is_config("target_type", "server") then
-- add_includedirs("src-server")
-- add_files("src-server/**.cpp")
-- else
-- add_includedirs("src-client")
-- add_files("src-client/**.cpp")
-- end

0 comments on commit e0e9546

Please sign in to comment.