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

Skip to content

Commit 5e5e631

Browse files
committed
fix collision with V2 of the library (issue BehaviorTree#125)
1 parent d68afa6 commit 5e5e631

File tree

4 files changed

+26
-28
lines changed

4 files changed

+26
-28
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ if(ament_cmake_FOUND)
107107
elseif(catkin_FOUND)
108108
set( BEHAVIOR_TREE_LIB_DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} )
109109
set( BEHAVIOR_TREE_INC_DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION} )
110-
set( BEHAVIOR_TREE_BIN_DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} )
110+
set( BEHAVIOR_TREE_BIN_DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} )
111111
else()
112112
set( BEHAVIOR_TREE_LIB_DESTINATION lib )
113113
set( BEHAVIOR_TREE_INC_DESTINATION include )
@@ -162,14 +162,14 @@ list(APPEND BT_SOURCE
162162
)
163163

164164
######################################################
165-
set(CMAKE_DEBUG_POSTFIX "d")
166165

167166
if (UNIX)
168167
list(APPEND BT_SOURCE src/shared_library_UNIX.cpp )
169168
add_library(${BEHAVIOR_TREE_LIBRARY} SHARED ${BT_SOURCE} )
170169
endif()
171170

172171
if (WIN32)
172+
set(CMAKE_DEBUG_POSTFIX "d")
173173
list(APPEND BT_SOURCE src/shared_library_WIN.cpp )
174174
add_library(${BEHAVIOR_TREE_LIBRARY} STATIC ${BT_SOURCE} )
175175
endif()

examples/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ set(CMAKE_DEBUG_POSTFIX "")
88
# loaded dynamically at run-time.
99
add_executable(t01_first_tree_static t01_build_your_first_tree.cpp )
1010
target_compile_definitions(t01_first_tree_static PRIVATE "MANUAL_STATIC_LINKING")
11-
target_link_libraries(t01_first_tree_static ${BEHAVIOR_TREE_LIBRARY} dummy_nodes )
11+
target_link_libraries(t01_first_tree_static ${BEHAVIOR_TREE_LIBRARY} bt_sample_nodes )
1212

1313
add_executable(t01_first_tree_dynamic t01_build_your_first_tree.cpp )
1414
target_link_libraries(t01_first_tree_dynamic ${BEHAVIOR_TREE_LIBRARY} )
1515

1616

1717
add_executable(t02_basic_ports t02_basic_ports.cpp )
18-
target_link_libraries(t02_basic_ports ${BEHAVIOR_TREE_LIBRARY} dummy_nodes )
18+
target_link_libraries(t02_basic_ports ${BEHAVIOR_TREE_LIBRARY} bt_sample_nodes )
1919

2020
add_executable(t03_generic_ports t03_generic_ports.cpp )
21-
target_link_libraries(t03_generic_ports ${BEHAVIOR_TREE_LIBRARY} movebase_node dummy_nodes )
21+
target_link_libraries(t03_generic_ports ${BEHAVIOR_TREE_LIBRARY} bt_sample_nodes )
2222

2323
add_executable(t04_reactive_sequence t04_reactive_sequence.cpp )
24-
target_link_libraries(t04_reactive_sequence ${BEHAVIOR_TREE_LIBRARY} movebase_node dummy_nodes )
24+
target_link_libraries(t04_reactive_sequence ${BEHAVIOR_TREE_LIBRARY} bt_sample_nodes )
2525

26-
add_executable(t05_crossdoor t05_crossdoor.cpp )
27-
target_link_libraries(t05_crossdoor ${BEHAVIOR_TREE_LIBRARY} crossdoor_nodes )
26+
add_executable(t05_cross_door t05_crossdoor.cpp )
27+
target_link_libraries(t05_cross_door ${BEHAVIOR_TREE_LIBRARY} bt_sample_nodes )
2828

2929
add_executable(t06_subtree_port_remapping t06_subtree_port_remapping.cpp )
30-
target_link_libraries(t06_subtree_port_remapping ${BEHAVIOR_TREE_LIBRARY} dummy_nodes movebase_node )
30+
target_link_libraries(t06_subtree_port_remapping ${BEHAVIOR_TREE_LIBRARY} bt_sample_nodes )
3131

3232
add_executable(t07_wrap_legacy t07_wrap_legacy.cpp )
3333
target_link_libraries(t07_wrap_legacy ${BEHAVIOR_TREE_LIBRARY} )
@@ -41,4 +41,4 @@ if (NOT MINGW)
4141
endif()
4242

4343
add_executable(t10_include_trees t10_include_trees.cpp )
44-
target_link_libraries(t10_include_trees ${BEHAVIOR_TREE_LIBRARY} dummy_nodes )
44+
target_link_libraries(t10_include_trees ${BEHAVIOR_TREE_LIBRARY} bt_sample_nodes )

sample_nodes/CMakeLists.txt

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@ include_directories( ../include )
66

77
set(CMAKE_DEBUG_POSTFIX "")
88

9-
add_library(crossdoor_nodes STATIC crossdoor_nodes.cpp )
10-
target_link_libraries(crossdoor_nodes PRIVATE ${BEHAVIOR_TREE_LIBRARY})
11-
set_target_properties(crossdoor_nodes PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} )
129

13-
add_library(dummy_nodes STATIC dummy_nodes.cpp )
14-
target_link_libraries(dummy_nodes PRIVATE ${BEHAVIOR_TREE_LIBRARY})
15-
set_target_properties(dummy_nodes PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} )
1610

17-
add_library(movebase_node STATIC movebase_node.cpp )
18-
target_link_libraries(movebase_node PRIVATE ${BEHAVIOR_TREE_LIBRARY})
19-
set_target_properties(movebase_node PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} )
11+
add_library(bt_sample_nodes STATIC
12+
crossdoor_nodes.cpp
13+
dummy_nodes.cpp
14+
movebase_node.cpp )
15+
16+
target_link_libraries(bt_sample_nodes PRIVATE ${BEHAVIOR_TREE_LIBRARY})
17+
set_target_properties(bt_sample_nodes PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} )
2018

2119
# to create a plugin, compile them in this way instead
2220

tools/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
cmake_minimum_required(VERSION 2.8)
22

33

4-
add_executable(bt_log_cat bt_log_cat.cpp )
5-
target_link_libraries(bt_log_cat ${BEHAVIOR_TREE_LIBRARY} )
6-
install(TARGETS bt_log_cat
4+
add_executable(bt3_log_cat bt_log_cat.cpp )
5+
target_link_libraries(bt3_log_cat ${BEHAVIOR_TREE_LIBRARY} )
6+
install(TARGETS bt3_log_cat
77
DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} )
88

99
if( ZMQ_FOUND )
10-
add_executable(bt_recorder bt_recorder.cpp )
11-
target_link_libraries(bt_recorder ${BEHAVIOR_TREE_LIBRARY} )
12-
install(TARGETS bt_recorder
10+
add_executable(bt3_recorder bt_recorder.cpp )
11+
target_link_libraries(bt3_recorder ${BEHAVIOR_TREE_LIBRARY} )
12+
install(TARGETS bt3_recorder
1313
DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} )
1414
endif()
1515

16-
add_executable(bt_plugin_manifest bt_plugin_manifest.cpp )
17-
target_link_libraries(bt_plugin_manifest ${BEHAVIOR_TREE_LIBRARY} )
18-
install(TARGETS bt_plugin_manifest
16+
add_executable(bt3_plugin_manifest bt_plugin_manifest.cpp )
17+
target_link_libraries(bt3_plugin_manifest ${BEHAVIOR_TREE_LIBRARY} )
18+
install(TARGETS bt3_plugin_manifest
1919
DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} )
2020

2121

0 commit comments

Comments
 (0)