Skip to content

Commit 2cd16d8

Browse files
committed
Refactor mesh loading and keep Gazebo compatibility
1 parent 960b04f commit 2cd16d8

File tree

17 files changed

+458
-343
lines changed

17 files changed

+458
-343
lines changed

cmake/dart_defs.cmake

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -872,21 +872,26 @@ function(add_component_targets package_name component)
872872
PROPERTY TYPE
873873
)
874874
if(NOT ("${dependency_type}" STREQUAL STATIC_LIBRARY
875-
OR "${dependency_type}" STREQUAL SHARED_LIBRARY))
875+
OR "${dependency_type}" STREQUAL SHARED_LIBRARY
876+
OR "${dependency_type}" STREQUAL INTERFACE_LIBRARY))
876877
message(
877878
FATAL_ERROR
878879
"Target '${dependency_target}' has unsupported type"
879880
" '${dependency_type}'. Only 'STATIC_LIBRARY' and 'SHARED_LIBRARY'"
880-
" are supported."
881+
" and 'INTERFACE_LIBRARY' are supported."
881882
)
882883
endif()
883884

884-
install(
885-
TARGETS "${dependency_target}"
886-
EXPORT "${target}"
887-
ARCHIVE DESTINATION "${LIBRARY_INSTALL_DIR}"
888-
LIBRARY DESTINATION "${LIBRARY_INSTALL_DIR}"
889-
)
885+
if("${dependency_type}" STREQUAL INTERFACE_LIBRARY)
886+
install(TARGETS "${dependency_target}" EXPORT "${target}")
887+
else()
888+
install(
889+
TARGETS "${dependency_target}"
890+
EXPORT "${target}"
891+
ARCHIVE DESTINATION "${LIBRARY_INSTALL_DIR}"
892+
LIBRARY DESTINATION "${LIBRARY_INSTALL_DIR}"
893+
)
894+
endif()
890895
endforeach()
891896

892897
set_property(

dart/CMakeLists.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,24 @@ if(spdlog_FOUND)
244244
add_component_dependency_packages(${PROJECT_NAME} dart spdlog)
245245
endif()
246246

247+
if(DART_BUILD_COLLISION_BULLET)
248+
add_library(dart-collision-bullet INTERFACE)
249+
target_link_libraries(dart-collision-bullet INTERFACE dart)
250+
251+
add_component(${PROJECT_NAME} collision-bullet)
252+
add_component_targets(${PROJECT_NAME} collision-bullet dart-collision-bullet)
253+
add_component_dependencies(${PROJECT_NAME} collision-bullet dart)
254+
endif()
255+
256+
if(DART_BUILD_COLLISION_ODE)
257+
add_library(dart-collision-ode INTERFACE)
258+
target_link_libraries(dart-collision-ode INTERFACE dart)
259+
260+
add_component(${PROJECT_NAME} collision-ode)
261+
add_component_targets(${PROJECT_NAME} collision-ode dart-collision-ode)
262+
add_component_dependencies(${PROJECT_NAME} collision-ode dart)
263+
endif()
264+
247265
if(MSVC)
248266
set_target_properties(
249267
dart PROPERTIES

dart/collision/fcl/FCLCollisionDetector.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@
5656
#include "dart/dynamics/VoxelGridShape.hpp"
5757

5858
#include <algorithm>
59-
#include <cstdint>
6059
#include <limits>
6160
#include <string>
6261

62+
#include <cstdint>
63+
6364
namespace dart {
6465
namespace collision {
6566

dart/dynamics/AssimpInputResourceAdaptor.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@
3737
#include <dart/dynamics/detail/AssimpInputResourceAdaptor.hpp>
3838

3939
#endif // DART_DYNAMICS_ASSIMPINPUTRESOURCEADAPTOR_PUBLIC_HPP_
40-

0 commit comments

Comments
 (0)