Skip to content

Commit

Permalink
Update xmake.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
star-hengxing authored Sep 10, 2024
1 parent 0702610 commit 8a82e88
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/a/asio2/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,26 @@ package("asio2")
"https://github.com/zhllxt/asio2.git")

add_versions("v2.9", "d173e83a22f6d4ec8697ac533f4cf71051b7aa5c550d24997d991610206dd534")

add_configs("ssl", {description = "Build OpenSSL module", default = false, type = "boolean"})

add_patches("2.9", "patches/2.9/remove-const.patch", "6326f333ab2d0484c23bb3cd9cfd5a565030b5525d083677565a693f5f8803b6")

add_deps("asio", "cereal")
add_deps("spdlog", { configs = { header_only = false, fmt_external = true } })

if is_plat("mingw") then
if is_plat("windows", "mingw") then
add_syslinks("ws2_32")
end

on_load(function (package)
if package:config("ssl") then
package:add("deps", "openssl3")
package:add("defines", "ASIO2_ENABLE_SSL")
end
end)

on_install("windows", "linux", "macosx", "mingw", "bsd", "cross", function (package)
if package:config("ssl") then
package:add("defines", "ASIO2_ENABLE_SSL")
end
os.cp("include/*", package:installdir("include"))
end)

Expand Down

0 comments on commit 8a82e88

Please sign in to comment.