Skip to content

Commit b451618

Browse files
committed
force tinyxml2_vendor in ROS2. See #1033 and #1028
1 parent 36d13ed commit b451618

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

CMakeLists.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ option(USE_VENDORED_FLATBUFFERS "Use the bundled version of flatbuffers" ON)
2828
option(USE_VENDORED_LEXY "Use the bundled version of lexy" ON)
2929
option(USE_VENDORED_MINICORO "Use the bundled version of minicoro" ON)
3030
option(USE_VENDORED_MINITRACE "Use the bundled version of minitrace" ON)
31-
option(USE_VENDORED_TINYXML2 "Use the bundled version of tinyxml2" ON)
3231

3332
set(BTCPP_LIB_DESTINATION lib)
3433
set(BTCPP_INCLUDE_DESTINATION include)
@@ -93,11 +92,21 @@ if ( ament_cmake_FOUND )
9392
message(STATUS "BehaviorTree is being built using AMENT.")
9493
message(STATUS "------------------------------------------")
9594
include(cmake/ament_build.cmake)
95+
96+
find_package(tinyxml2_vendor REQUIRED)
97+
find_package(TinyXML2 REQUIRED)
9698
else()
9799
message(STATUS "------------------------------------------")
98100
message(STATUS "BehaviorTree is being built without AMENT.")
99101
message(STATUS "------------------------------------------")
100102
include(cmake/conan_build.cmake)
103+
104+
option(USE_VENDORED_TINYXML2 "Use the bundled version of tinyxml2" ON)
105+
if(USE_VENDORED_TINYXML2)
106+
add_subdirectory(3rdparty/tinyxml2)
107+
else()
108+
find_package(tinyxml2 REQUIRED)
109+
endif()
101110
endif()
102111

103112
#############################################################
@@ -141,12 +150,6 @@ else()
141150
find_package(minitrace REQUIRED)
142151
endif()
143152

144-
if(USE_VENDORED_TINYXML2)
145-
add_subdirectory(3rdparty/tinyxml2)
146-
else()
147-
find_package(tinyxml2 REQUIRED)
148-
endif()
149-
150153
list(APPEND BT_SOURCE
151154
src/action_node.cpp
152155
src/basic_types.cpp

package.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
<depend>libsqlite3-dev</depend>
2424
<depend>libzmq3-dev</depend>
25+
<depend>tinyxml2</depend>
26+
<depend>tinyxml2_vendor</depend>
2527

2628
<test_depend >ament_cmake_gtest</test_depend>
2729

0 commit comments

Comments
 (0)