Skip to content

Commit 8c48841

Browse files
lsk567claude
andcommitted
Restore install(EXPORT) for ament compatibility
The ament_package() generated Config.cmake includes the export targets file, so we need to install it. The previous fix incorrectly removed this when using ament. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d283d94 commit 8c48841

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

lib/CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ if(REACTOR_CPP_INSTALL)
6666
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" OPTIONAL
6767
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" OPTIONAL)
6868

69-
# Only install export file manually when not using ament.
70-
# When using ament, ament_package() handles export installation.
71-
if(NOT REACTOR_CPP_USE_AMENT)
72-
install(EXPORT ${LIB_TARGET}Targets DESTINATION share/${LIB_TARGET}/cmake)
73-
endif()
69+
# Install the export file. Both ament and non-ament builds need this.
70+
# For ament builds, ament_package() generates Config.cmake that includes this file.
71+
install(EXPORT ${LIB_TARGET}Targets
72+
DESTINATION share/${LIB_TARGET}/cmake)
7473
endif()

0 commit comments

Comments
 (0)