File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ endif()
6464
6565#---- Find other packages ----
6666find_package (Threads REQUIRED )
67+ find_package (tinyxml2 )
6768
6869
6970set (BEHAVIOR_TREE_LIBRARY ${PROJECT_NAME } )
@@ -141,10 +142,11 @@ list(APPEND BT_SOURCE
141142 src/loggers/bt_file_logger_v2.cpp
142143 src/loggers/bt_minitrace_logger.cpp
143144 src/loggers/bt_observer.cpp
144-
145- 3rdparty/tinyxml2/tinyxml2.cpp
146145 )
147146
147+ if (NOT tinyxml2_FOUND)
148+ list (APPEND BT_SOURCE 3rdparty/tinyxml2/src/tinyxml2.cpp)
149+ endif ()
148150
149151if (BTCPP_GROOT_INTERFACE)
150152 # should be found already, at this stage
@@ -186,6 +188,15 @@ target_link_libraries(${BTCPP_LIBRARY}
186188 ${BTCPP_EXTRA_LIBRARIES}
187189)
188190
191+ if (tinyxml2_FOUND)
192+ target_link_libraries (${BTCPP_LIBRARY} PRIVATE tinyxml2::tinyxml2 )
193+ else ()
194+ target_include_directories (${BTCPP_LIBRARY} PRIVATE
195+ $<BUILD_INTERFACE :${CMAKE_CURRENT_SOURCE_DIR } /3rdparty /tinyxml2 /include >
196+ )
197+ endif ()
198+
199+
189200target_include_directories (${BTCPP_LIBRARY}
190201 PUBLIC
191202 $<BUILD_INTERFACE :${CMAKE_CURRENT_SOURCE_DIR } /include >
You can’t perform that action at this time.
0 commit comments