Skip to content

Commit

Permalink
link against tinyxml2 correctly (#190)
Browse files Browse the repository at this point in the history
* link against tinyxml2 correctly

* remove tinyxml2_vendor library

* use ament target dependencies for TinyXML2

Signed-off-by: Karsten Knese <[email protected]>
  • Loading branch information
Karsten1987 authored May 20, 2020
1 parent 306f6ca commit bdcbd2e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion pluginlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ add_library(${PROJECT_NAME} INTERFACE)
target_include_directories(${PROJECT_NAME} INTERFACE
"$<INSTALL_INTERFACE:include>")
ament_target_dependencies(${PROJECT_NAME} INTERFACE
ament_index_cpp class_loader rcutils rcpputils tinyxml2_vendor TinyXML2)
ament_index_cpp class_loader rcutils rcpputils TinyXML2)
ament_export_dependencies(ament_index_cpp class_loader rcutils rcpputils tinyxml2_vendor TinyXML2)
ament_export_include_directories(include)
ament_export_targets(${PROJECT_NAME})
Expand Down
11 changes: 0 additions & 11 deletions pluginlib/pluginlib-extras.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,3 @@ if(UNIX AND NOT APPLE)
# ament_export_libraries() because it is not absolute and cannot be found with find_library
list(APPEND pluginlib_LIBRARIES ${FILESYSTEM_LIB})
endif()

find_package(tinyxml2_vendor REQUIRED)
find_package(TinyXML2 REQUIRED)
list(APPEND pluginlib_LIBRARIES ${TinyXML2_LIBRARIES})

add_library(tinyxml2_vendor INTERFACE IMPORTED)
target_include_directories(tinyxml2_vendor INTERFACE
${TinyXML2_INCLUDE_DIRS})
target_link_libraries(tinyxml2_vendor INTERFACE
${TinyXML2_LIBRARIES})
list(APPEND pluginlib_TARGETS tinyxml2_vendor)

0 comments on commit bdcbd2e

Please sign in to comment.