ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
As of Foxy Fitzroy ament_export_interfaces
is deprecated, replaced with ament_export_targets
. The documentation was outdated and has been updated in https://github.com/ros2/ros2_documentation/pull/804.
There's a recommendation in the tutorial to use a different EXPORT name than the library:
The
EXPORT
notation of the install call requires additional attention: It installs the CMake files for themy_library
target. It is named exactly like the argument inament_export_interfaces
and could be named like the library. However, this will then prohibit using theament_target_dependencies
way of including your library. To allow for full flexibility, it is advised to prepend the export target with something likeexport_<target>
.
I don't know if it solves your issue, but you could try making the following changes to your first CMakeLists.txt:
ament_export_targets(export_ftd2xx HAS_LIBRARY_TARGET)
ament_export_targets(export_EposCmd HAS_LIBRARY_TARGET)
install(
DIRECTORY include/
DESTINATION include
)
install(
TARGETS ftd2xx
EXPORT export_ftd2xx
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
install(
TARGETS EposCmd
EXPORT export_EposCmd
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)