This commit is contained in:
2025-12-25 11:04:24 +07:00
parent 3c728db668
commit a9a2445305
29 changed files with 228 additions and 102 deletions

View File

@@ -39,6 +39,10 @@ target_link_libraries(conversions
Boost::thread
)
set_target_properties(conversions PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
)
add_library(path_ops src/path_ops.cpp)
target_include_directories(path_ops
PUBLIC
@@ -58,22 +62,28 @@ target_include_directories(polygons
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(polygons
PUBLIC
nav_2d_msgs
geometry_msgs
robot_cpp
PRIVATE
${xmlrpcpp_LIBRARIES}
)
if(xmlrpcpp_FOUND)
target_include_directories(polygons PRIVATE ${xmlrpcpp_INCLUDE_DIRS})
target_link_libraries(polygons
PUBLIC nav_2d_msgs geometry_msgs robot_cpp
PRIVATE ${xmlrpcpp_LIBRARIES})
elseif(XmlRpcCpp_FOUND)
target_include_directories(polygons PRIVATE ${XmlRpcCpp_INCLUDE_DIRS})
target_link_libraries(polygons PRIVATE ${XmlRpcCpp_LIBRARIES})
target_link_libraries(polygons
PUBLIC nav_2d_msgs geometry_msgs robot_cpp
PRIVATE ${XmlRpcCpp_LIBRARIES})
else()
target_include_directories(polygons PRIVATE ${xmlrpcpp_INCLUDE_DIRS})
target_link_libraries(polygons
PUBLIC nav_2d_msgs geometry_msgs robot_cpp
PRIVATE ${xmlrpcpp_LIBRARIES})
endif()
set_target_properties(polygons PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
)
add_library(bounds src/bounds.cpp)
target_include_directories(bounds
PUBLIC
@@ -87,6 +97,10 @@ target_link_libraries(bounds
robot_cpp
)
set_target_properties(bounds PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
)
add_library(tf_help src/tf_help.cpp)
target_include_directories(tf_help
PUBLIC
@@ -102,6 +116,10 @@ target_link_libraries(tf_help
robot_cpp
)
set_target_properties(tf_help PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
)
# Create an INTERFACE library that represents all nav_2d_utils libraries
add_library(nav_2d_utils INTERFACE)
target_include_directories(nav_2d_utils

View File

@@ -14,6 +14,9 @@ include_directories(include ${console_bridge_INCLUDE_DIRS})
#CPP Libraries
add_library(tf3 src/cache.cpp src/buffer_core.cpp src/static_cache.cpp)
target_link_libraries(tf3 ${Boost_LIBRARIES} ${console_bridge_LIBRARIES})
set_target_properties(tf3 PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
)
target_include_directories(tf3 PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
@@ -21,7 +24,9 @@ target_include_directories(tf3 PUBLIC
add_executable(simple_tf3_example examples/simple_tf3_example.cpp)
target_include_directories(simple_tf3_example PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_link_libraries(simple_tf3_example PRIVATE tf3 pthread ${console_bridge_LIBRARIES})
set_target_properties(simple_tf3_example PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
)
install(TARGETS tf3
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib