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.

28 lines
1.0 KiB

5 years ago
package("pybind11")
set_homepage("https://github.com/pybind/pybind11")
set_description("Seamless operability between C++11 and Python.")
add_urls("https://github.com/pybind/pybind11/archive/$(version).zip",
5 years ago
"https://github.com/pybind/pybind11.git")
add_versions("v2.5.0", "1859f121837f6c41b0c6223d617b85a63f2f72132bae3135a2aa290582d61520")
add_versions("v2.6.2", "0bdb5fd9616fcfa20918d043501883bf912502843d5afc5bc7329a8bceb157b3")
5 years ago
add_deps("cmake", "python 3.x")
5 years ago
on_install("windows", "macosx", "linux", function (package)
import("package.tools.cmake").install(package, {"-DPYBIND11_TEST=OFF"})
5 years ago
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <pybind11/pybind11.h>
int add(int i, int j) {
return i + j;
}
5 years ago
PYBIND11_MODULE(example, m) {
5 years ago
m.def("add", &add, "A function which adds two numbers");
}
]]}, {configs = {languages = "c++11"}}))
end)