diff --git a/nav2_rviz_plugins/CMakeLists.txt b/nav2_rviz_plugins/CMakeLists.txt
index 65c32d8e852a20c227300bba7990b3e52837afa0..f344363296c861f0c1ff8ab7f5f98ffa98c9c3b1 100644
--- a/nav2_rviz_plugins/CMakeLists.txt
+++ b/nav2_rviz_plugins/CMakeLists.txt
@@ -112,7 +112,7 @@ if(BUILD_TESTING)
 endif()
 
 ament_export_include_directories(include)
-ament_export_interfaces(${library_name} HAS_LIBRARY_TARGET)
+ament_export_targets(${library_name} HAS_LIBRARY_TARGET)
 ament_export_dependencies(
   Qt5
   rviz_common