package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.0 KiB
27 lines
1.0 KiB
3 years ago
|
package("cppzmq")
|
||
|
|
||
|
set_kind("library", {headeronly = true})
|
||
|
set_homepage("http://www.zeromq.org/")
|
||
|
set_description("Header-only C++ binding for libzmq")
|
||
|
set_license("MIT")
|
||
|
|
||
|
add_urls("https://github.com/zeromq/cppzmq/archive/refs/tags/$(version).tar.gz",
|
||
|
"https://github.com/zeromq/cppzmq.git")
|
||
|
add_versions("v4.8.1", "7a23639a45f3a0049e11a188e29aaedd10b2f4845f0000cf3e22d6774ebde0af")
|
||
|
|
||
|
add_deps("cmake", "zeromq")
|
||
|
on_install("windows", "macosx", "linux", function (package)
|
||
|
import("package.tools.cmake").install(package, {"-DCPPZMQ_BUILD_TESTS=OFF"})
|
||
|
end)
|
||
|
|
||
|
on_test(function (package)
|
||
|
assert(package:check_cxxsnippets([[
|
||
|
void test() {
|
||
|
zmq::context_t ctx;
|
||
|
zmq::socket_t sock(ctx, zmq::socket_type::push);
|
||
|
sock.bind("inproc://test");
|
||
|
sock.send(zmq::str_buffer("Hello, world"), zmq::send_flags::dontwait);
|
||
|
}
|
||
|
]], {configs = {languages = "c++14"}, includes = "zmq.hpp"}))
|
||
|
end)
|