Skip to content

Commit 45ff3ea

Browse files
JafarAbdirhaschke
authored andcommitted
Improve cmake
- Modernize - Add include folder for INSTALL_INTERFACE
1 parent a0befc5 commit 45ff3ea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ install(DIRECTORY include/ DESTINATION include
3434

3535
pluginlib_export_plugin_description_file(${PROJECT_NAME} motion_planning_stages_plugin_description.xml)
3636

37-
ament_export_include_directories(include)
38-
ament_export_libraries(${PROJECT_NAME} ${PROJECT_NAME}_stages)
37+
ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET)
3938
ament_export_dependencies(Boost)
4039
ament_export_dependencies(geometry_msgs)
4140
ament_export_dependencies(moveit_core)

core/src/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ ament_target_dependencies(${PROJECT_NAME}
4747
)
4848
target_include_directories(${PROJECT_NAME}
4949
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
50-
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
50+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
51+
$<INSTALL_INTERFACE:include>
5152
)
5253

5354
add_subdirectory(stages)
5455

5556
install(TARGETS ${PROJECT_NAME}
56-
EXPORT ${PROJECT_NAME}
57+
EXPORT ${PROJECT_NAME}Targets
5758
ARCHIVE DESTINATION lib
5859
LIBRARY DESTINATION lib)

0 commit comments

Comments
 (0)