Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8752fa8

Browse files
committed
readme updated
1 parent 3cb8ee0 commit 8752fa8

File tree

4 files changed

+38
-16
lines changed

4 files changed

+38
-16
lines changed

CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,9 @@ endif()
229229

230230
######################################################
231231
# INSTALL
232-
set(PROJECT_NAMESPACE BehaviorTreeV3)
233-
set(PROJECT_CONFIG ${PROJECT_NAMESPACE}Config)
234232

235233
INSTALL(TARGETS ${BEHAVIOR_TREE_LIBRARY}
236-
EXPORT ${PROJECT_CONFIG}
234+
EXPORT BehaviorTreeV3Config
237235
ARCHIVE DESTINATION ${BEHAVIOR_TREE_LIB_DESTINATION}
238236
LIBRARY DESTINATION ${BEHAVIOR_TREE_LIB_DESTINATION}
239237
RUNTIME DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION}
@@ -243,13 +241,15 @@ INSTALL( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
243241
DESTINATION ${BEHAVIOR_TREE_INC_DESTINATION}
244242
FILES_MATCHING PATTERN "*.h*")
245243

246-
install(EXPORT ${PROJECT_CONFIG}
247-
DESTINATION "${BEHAVIOR_TREE_LIB_DESTINATION}/${PROJECT_NAMESPACE}/cmake"
248-
NAMESPACE ${PROJECT_NAMESPACE}::)
244+
install(EXPORT BehaviorTreeV3Config
245+
DESTINATION "${BEHAVIOR_TREE_LIB_DESTINATION}/$BehaviorTreeV3/cmake"
246+
NAMESPACE BT::)
249247

250248
export(TARGETS ${PROJECT_NAME}
251-
NAMESPACE ${PROJECT_NAMESPACE}::
252-
FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_CONFIG}.cmake")
249+
NAMESPACE BT::
250+
FILE "${CMAKE_CURRENT_BINARY_DIR}/BehaviorTreeV3Config.cmake")
251+
252+
export(PACKAGE ${PROJECT_NAME})
253253

254254
######################################################
255255
# EXAMPLES and TOOLS

README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,41 @@ the graphic user interface are used to design and monitor a Behavior Tree.
8080

8181
[![MOOD2Be](video_MOOD2Be.png)](https://vimeo.com/304651183)
8282

83-
# How to compile
83+
# How to compile (plain old cmake
8484

85-
On Ubuntu, you must install the following dependencies:
85+
On Ubuntu, you are encourage to install the following dependencies:
8686

87-
sudo apt-get install libzmq3-dev libdw-dev
87+
sudo apt-get install libzmq3-dev libboost-dev
8888
89-
Any other dependency is already included in the __3rdparty__ folder.
89+
Other dependency is already included in the __3rdparty__ folder.
9090

91-
## Catkin and ROS users
91+
To compile and install the library, from the BehaviorTree.CPP folder, execute:
92+
93+
mkdir build; cd build
94+
cmake ..
95+
make
96+
sudo make install
97+
98+
Your typical **CMakeLists.txt** file will look like this:
99+
100+
```cmake
101+
cmake_minimum_required(VERSION 3.5)
102+
103+
project(hello_BT)
104+
105+
set(CMAKE_CXX_STANDARD 14)
106+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
107+
find_package(BehaviorTreeV3)
108+
109+
add_executable(${PROJECT_NAME} "hello_BT.cpp")
110+
target_link_libraries(${PROJECT_NAME} BT3::behaviortree_cpp_v3)
111+
```
112+
113+
## ROS1 or ROS2 users (Catkin/Ament)
92114

93115
You can easily install the package with the command
94116

95-
sudo apt-get install ros-$ROS_DISTRO-behaviortree-cpp
117+
sudo apt-get install ros-$ROS_DISTRO-behaviortree-cpp-v3
96118
97119
If you want to compile it with catkin, you __must__ include this package
98120
to your catkin workspace.

examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 2.8)
1+
cmake_minimum_required(VERSION 3.5.2)
22

33
include_directories( ../sample_nodes )
44

sample_nodes/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 2.8)
1+
cmake_minimum_required(VERSION 3.5.2)
22

33
include_directories( ../include )
44

0 commit comments

Comments
 (0)