Skip to content

Commit

Permalink
Install directory using CMake variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurVal committed Feb 26, 2025
1 parent d68a5b2 commit 11eafc4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,21 @@ include(GNUInstallDirs)
# Install Python modules
ament_python_install_package(${PROJECT_NAME}_py)

install(
DIRECTORY
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}>
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
)

install(
TARGETS ${PROJECT_NAME}_conversion
EXPORT export_${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

install(FILES package.xml DESTINATION share/${PROJECT_NAME})
install(
DIRECTORY include/${PROJECT_NAME}
DESTINATION include
PATTERN "third_party" EXCLUDE)

ament_export_targets(export_${PROJECT_NAME} HAS_LIBRARY_TARGET)
ament_export_dependencies(rosidl_default_runtime)
Expand Down

0 comments on commit 11eafc4

Please sign in to comment.