@@ -13,7 +13,7 @@ if( CATKIN_DEVEL_PREFIX OR CATKIN_BUILD_BINARY_PACKAGE)
1313endif ()
1414
1515if (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 )
2828endif (catkin_FOUND)
@@ -50,8 +50,13 @@ add_subdirectory( QtNodeEditor )
5050set (BUILD_EXAMPLES OFF CACHE BOOL "" )
5151set (BUILD_UNIT_TESTS OFF CACHE BOOL "" )
5252set (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
5762set (APP_CPPS
@@ -109,9 +114,9 @@ add_library(behavior_tree_editor
109114)
110115
111116if ( ZMQ_FOUND )
112- target_link_libraries (behavior_tree_editor QtNodeEditor zmq )
117+ target_link_libraries (behavior_tree_editor QtNodeEditor zmq ${catkin_LIBRARIES} )
113118else ()
114- target_link_libraries (behavior_tree_editor QtNodeEditor )
119+ target_link_libraries (behavior_tree_editor QtNodeEditor ${catkin_LIBRARIES} )
115120endif ()
116121
117122
0 commit comments