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.
33 lines
1.2 KiB
33 lines
1.2 KiB
11 months ago
|
package("aitoolkit")
|
||
|
set_kind("library", {headeronly = true})
|
||
|
set_homepage("https://linkdd.github.io/aitoolkit/")
|
||
|
set_description("Give a brain to your game's NPCs")
|
||
|
set_license("MIT")
|
||
|
|
||
|
add_urls("https://github.com/linkdd/aitoolkit/archive/refs/tags/$(version).tar.gz",
|
||
|
"https://github.com/linkdd/aitoolkit.git")
|
||
|
|
||
|
add_versions("v0.3.0", "8cbe1d281235a3486c5840c7f9782f2b3b2ed181d76e8cbe83a2b1395d21ab8a")
|
||
|
|
||
|
on_install(function (package)
|
||
|
os.cp("include", package:installdir())
|
||
|
end)
|
||
|
|
||
|
on_test(function (package)
|
||
|
assert(package:check_cxxsnippets({test = [[
|
||
|
#include <aitoolkit/fsm.hpp>
|
||
|
using namespace aitoolkit::fsm;
|
||
|
|
||
|
struct blackboard_type{};
|
||
|
class state_dummy final : public state<blackboard_type> {
|
||
|
public:
|
||
|
virtual void enter(blackboard_type& blackboard) override {}
|
||
|
};
|
||
|
void test() {
|
||
|
auto simple_bb = blackboard_type{};
|
||
|
auto simple_fsm = simple_machine<blackboard_type>();
|
||
|
simple_fsm.set_state(std::make_shared<state_dummy>(), simple_bb);
|
||
|
}
|
||
|
]]}, {configs = {languages = "c++20"}}))
|
||
|
end)
|