Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add acl-server lib #2837

Closed
wants to merge 22 commits into from
Closed
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions packages/a/acl-server/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package("acl-server")

set_homepage("https://github.com/acl-dev/acl")
set_description("A powerful multi-platform network communication library and service framework")
set_license("LGPL-3.0")

set_urls("https://github.com/acl-dev/acl.git")
add_versions("2023.11.17", "1d9386a73d0317850be27d5a94381e8c4b9ffd26")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有 tag 和 release 的干嘛不用,优先走 tag/release

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

他的 release 命名都是 "3.6.1-6" "3.6.1-5" 这种,我翻了下 xmake-repo 已有的版本号规则,好像没有这样的,不知道怎么处理,所以干脆用commit了

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

参考 openssl 包


add_deps("cmake")

on_load(function (package)
if package:config("shared") then
package:add("defines", "ACL_DLL", "HTTP_DLL", "ACL_CPP_DLL")
end
end)

on_install(function (package)
local configs = {"-DACL_BUILD_SHARED =" .. (package:config("shared") and "YES" or "NO")}
import("package.tools.cmake").install(package, configs)
os.cp(path.join("lib_acl_cpp", "include"), package:installdir())
os.cp(path.join("lib_acl", "include"), package:installdir())
os.cp(path.join("lib_fiber", "cpp", "include"), package:installdir())
os.cp(path.join("lib_protocol", "include"), package:installdir())
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <iostream>
#include "acl_cpp/lib_acl.hpp"
void test() {
acl::string buf = "hello world!\r\n";
std::cout << buf.c_str() << std::endl;
}
]]}))
end)
Loading