@@ -28,7 +28,6 @@ option(USE_VENDORED_FLATBUFFERS "Use the bundled version of flatbuffers" ON)
2828option (USE_VENDORED_LEXY "Use the bundled version of lexy" ON )
2929option (USE_VENDORED_MINICORO "Use the bundled version of minicoro" ON )
3030option (USE_VENDORED_MINITRACE "Use the bundled version of minitrace" ON )
31- option (USE_VENDORED_TINYXML2 "Use the bundled version of tinyxml2" ON )
3231
3332set (BTCPP_LIB_DESTINATION lib)
3433set (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)
9698else ()
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 ()
101110endif ()
102111
103112#############################################################
@@ -141,12 +150,6 @@ else()
141150 find_package (minitrace REQUIRED)
142151endif ()
143152
144- if (USE_VENDORED_TINYXML2)
145- add_subdirectory (3rdparty/tinyxml2)
146- else ()
147- find_package (tinyxml2 REQUIRED)
148- endif ()
149-
150153list (APPEND BT_SOURCE
151154 src/action_node.cpp
152155 src/basic_types.cpp
0 commit comments