Skip to content

Commit 60405a3

Browse files
authored
Fix dependency handling (#256)
Declare fcl, qhull, and assimp as non-transitive, build-only dependencies. They are not exposed in headers.
1 parent cf9eb23 commit 60405a3

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

CMakeLists.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,12 @@ target_compile_options(${PROJECT_NAME} PRIVATE ${PROJECT_COMPILE_OPTIONS})
9090
target_include_directories(${PROJECT_NAME}
9191
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
9292
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>)
93-
target_link_libraries(${PROJECT_NAME} fcl)
94-
ament_target_dependencies(${PROJECT_NAME}
93+
ament_target_dependencies(${PROJECT_NAME} PUBLIC
9594
${THIS_PACKAGE_EXPORT_DEPENDS}
9695
)
97-
ament_target_dependencies(${PROJECT_NAME} SYSTEM
98-
# We don't export these dependencies because their cmake is broken
99-
assimp
100-
QHULL
101-
)
96+
# Private libraries that are not transitively needed by downstream projects
97+
target_link_libraries(${PROJECT_NAME} PRIVATE assimp::assimp fcl ${QHULL_LIBRARIES})
98+
target_include_directories(${PROJECT_NAME} PRIVATE ${QHULL_INCLUDE_DIRS})
10299

103100
if(BUILD_TESTING)
104101
find_package(ament_cmake_gtest REQUIRED)

package.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<depend>rclcpp</depend>
2828
<depend>eigen_stl_containers</depend>
2929
<depend>console_bridge_vendor</depend>
30-
<depend>libqhull</depend>
3130
<depend>liboctomap-dev</depend>
3231
<depend>random_numbers</depend>
3332
<depend>resource_retriever</depend>
@@ -38,6 +37,7 @@
3837
<build_depend>assimp-dev</build_depend>
3938
<build_depend>eigen</build_depend>
4039
<build_depend>libfcl-dev</build_depend>
40+
<build_depend>libqhull</build_depend>
4141
<build_depend>pkg-config</build_depend>
4242
<build_depend>libboost-dev</build_depend>
4343
<build_depend>libboost-filesystem-dev</build_depend>
@@ -48,6 +48,7 @@
4848
<exec_depend>libboost-filesystem</exec_depend>
4949
<exec_depend>rosidl_default_runtime</exec_depend>
5050
<exec_depend>libfcl</exec_depend>
51+
<exec_depend>libqhull</exec_depend>
5152

5253
<test_depend>ament_cmake_gtest</test_depend>
5354
<test_depend>ament_lint_auto</test_depend>

0 commit comments

Comments
 (0)