Skip to content

Commit

Permalink
build: update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
RimuruChan committed Feb 19, 2024
1 parent fb1cafa commit c949be0
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,25 @@ add_rules("mode.debug", "mode.release")

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")

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

target("change-this") -- Change this to your plugin name.
add_cxflags(
"/EHa", -- To catch both structured (asynchronous) and standard C++ (synchronous) exceptions.
"/utf-8" -- To enable UTF-8 source code.
)
add_defines(
"_HAS_CXX23=1", -- To enable C++23 features
"NOMINMAX", -- To avoid conflicts with std::min and std::max.
"UNICODE" -- To enable Unicode support in Windows API.
)
add_files(
"src/**.cpp"
)
add_includedirs(
"src"
)
add_packages(
"levilamina"
)
add_shflags(
"/DELAYLOAD:bedrock_server.dll" -- To use forged symbols of SymbolProvider.
)
add_cxflags("/EHa", "/utf-8")
add_defines("NOMINMAX", "UNICODE")
add_files("src/**.cpp")
add_includedirs("src")
add_packages("levilamina")
add_shflags("/DELAYLOAD:bedrock_server.dll") -- To use symbols provided by SymbolProvider.
set_exceptions("none") -- To avoid conflicts with /EHa.
set_kind("shared")
set_languages("cxx20")
set_languages("c++20")
set_symbols("debug")

after_build(function (target)
Expand Down

0 comments on commit c949be0

Please sign in to comment.