Skip to content

Commit 662244c

Browse files
committed
behaviortree.cpp 4.6.2 (new formula)
1 parent a1a7326 commit 662244c

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Formula/b/behaviortree.cpp.rb

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
class BehaviortreeCpp < Formula
2+
desc "Behavior Trees Library in C++"
3+
homepage "https://www.behaviortree.dev/"
4+
url "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.6.2.tar.gz"
5+
sha256 "b0e7e53b27feae894e2df3f3faadfdd49f2108ebccfb1bd7cc0d405ffc56cecd"
6+
license "MIT"
7+
8+
depends_on "cmake" => :build
9+
depends_on "cppzmq"
10+
depends_on "zeromq"
11+
12+
uses_from_macos "sqlite"
13+
14+
def install
15+
system "cmake", "-S", ".", "-B", "build",
16+
"-DCMAKE_INSTALL_RPATH=#{rpath}",
17+
"-DBTCPP_UNIT_TESTS=OFF",
18+
"-DBTCPP_EXAMPLES=OFF",
19+
*std_cmake_args
20+
system "cmake", "--build", "build"
21+
system "cmake", "--install", "build"
22+
pkgshare.install "examples"
23+
end
24+
25+
test do
26+
cp pkgshare/"examples/t03_generic_ports.cpp", testpath/"test.cpp"
27+
system ENV.cxx, "-std=c++17", "test.cpp", "-L#{lib}", "-lbehaviortree_cpp", "-o", "test"
28+
assert_match "Target positions: [ -1.0, 3.0 ]", shell_output("./test")
29+
end
30+
end

0 commit comments

Comments
 (0)