File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.16.3 ) # version on Ubuntu Focal
1+ cmake_minimum_required (VERSION 3.20 )
22
33project (behaviortree_cpp VERSION 4.9.0 LANGUAGES C CXX )
44
Original file line number Diff line number Diff line change 1- include_directories ( ../sample_nodes )
2-
31set (CMAKE_DEBUG_POSTFIX "" )
42
53function (CompileExample name )
@@ -11,10 +9,12 @@ endfunction()
119# The plugin libdummy_nodes.so can be linked statically or
1210# loaded dynamically at run-time.
1311add_executable (t01_first_tree_static t01_build_your_first_tree.cpp )
12+ target_include_directories (t01_first_tree_static PRIVATE ../sample_nodes )
1413target_compile_definitions (t01_first_tree_static PRIVATE "MANUAL_STATIC_LINKING" )
1514target_link_libraries (t01_first_tree_static ${BTCPP_LIBRARY} bt_sample_nodes )
1615
1716add_executable (t01_first_tree_dynamic t01_build_your_first_tree.cpp )
17+ target_include_directories (t01_first_tree_dynamic PRIVATE ../sample_nodes )
1818target_link_libraries (t01_first_tree_dynamic ${BTCPP_LIBRARY} )
1919
2020CompileExample ("t02_basic_ports" )
@@ -47,6 +47,23 @@ if(BTCPP_SQLITE_LOGGING)
4747 CompileExample ("ex03_sqlite_log" )
4848endif ()
4949
50+ set (SAMPLE_NODE_EXAMPLES
51+ t02_basic_ports
52+ t04_reactive_sequence
53+ t05_crossdoor
54+ t06_subtree_port_remapping
55+ t07_load_multiple_xml
56+ t09_scripting
57+ t11_groot_howto
58+ t15_nodes_mocking
59+ t17_blackboard_backup
60+ ex03_sqlite_log)
61+ foreach (EXAMPLE IN LISTS SAMPLE_NODE_EXAMPLES)
62+ if (TARGET ${EXAMPLE} )
63+ target_include_directories (${EXAMPLE} PRIVATE ../sample_nodes )
64+ endif ()
65+ endforeach ()
66+
5067
5168############ Create plugin and executor in folder plugin_example ##########
5269
You can’t perform that action at this time.
0 commit comments