Skip to content

Commit 002714b

Browse files
author
Davide Faconti
committed
fix compilation with catkin
1 parent 88c95fc commit 002714b

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

CMakeLists.txt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if( CATKIN_DEVEL_PREFIX OR CATKIN_BUILD_BINARY_PACKAGE)
1313
endif()
1414

1515
if(catkin_FOUND)
16-
find_package(catkin REQUIRED COMPONENTS behaviortree_cpp rosbag rosbag_storage roscpp)
16+
find_package(catkin REQUIRED COMPONENTS behaviortree_cpp_v3 rosbag rosbag_storage roscpp)
1717

1818
message(STATUS "------------------------------------------------")
1919
message(STATUS "BehaviourTreeEditor is being built using CATKIN.")
@@ -22,7 +22,7 @@ if(catkin_FOUND)
2222
catkin_package(
2323
INCLUDE_DIRS
2424
LIBRARIES qt_node_editor
25-
CATKIN_DEPENDS behaviortree_cpp
25+
CATKIN_DEPENDS behaviortree_cpp_v3
2626
DEPENDS
2727
)
2828
endif(catkin_FOUND)
@@ -50,8 +50,13 @@ add_subdirectory( QtNodeEditor )
5050
set(BUILD_EXAMPLES OFF CACHE BOOL "")
5151
set(BUILD_UNIT_TESTS OFF CACHE BOOL "")
5252
set(BUILD_TOOLS OFF CACHE BOO "")
53-
add_subdirectory( depend/BehaviorTree.CPP )
54-
include_directories( depend/BehaviorTree.CPP/include )
53+
54+
if(NOT catkin_FOUND)
55+
# use git submodule only if you are not compiling with catkin
56+
add_subdirectory( depend/BehaviorTree.CPP )
57+
include_directories( depend/BehaviorTree.CPP/include )
58+
endif()
59+
5560
##########################################
5661

5762
set(APP_CPPS
@@ -109,9 +114,9 @@ add_library(behavior_tree_editor
109114
)
110115

111116
if( ZMQ_FOUND )
112-
target_link_libraries(behavior_tree_editor QtNodeEditor zmq )
117+
target_link_libraries(behavior_tree_editor QtNodeEditor zmq ${catkin_LIBRARIES})
113118
else()
114-
target_link_libraries(behavior_tree_editor QtNodeEditor )
119+
target_link_libraries(behavior_tree_editor QtNodeEditor ${catkin_LIBRARIES} )
115120
endif()
116121

117122

bt_editor/utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include <nodes/NodeStyle>
88

99
#include "bt_editor_base.h"
10-
#include <behaviortree_cpp/loggers/BT_logger_generated.h>
11-
#include <behaviortree_cpp/loggers/bt_flatbuffer_helper.h>
10+
#include <behaviortree_cpp/flatbuffers/BT_logger_generated.h>
11+
#include <behaviortree_cpp/flatbuffers/bt_flatbuffer_helper.h>
1212

1313
QtNodes::Node* findRoot(const QtNodes::FlowScene &scene);
1414

package.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
<build_depend>pluginlib</build_depend>
1717
<build_depend>roscpp</build_depend>
18-
<build_depend>behaviortree_cpp</build_depend>
18+
<build_depend>behaviortree_cpp_v3</build_depend>
1919

2020
<run_depend>pluginlib</run_depend>
2121
<run_depend>roscpp</run_depend>
22-
<run_depend>behaviortree_cpp</run_depend>
22+
<run_depend>behaviortree_cpp_v3</run_depend>
2323

2424
<!-- The export tag contains other, unspecified, tags -->
2525
<export>

0 commit comments

Comments
 (0)