diff --git a/sensor_msgs/CMakeLists.txt b/sensor_msgs/CMakeLists.txt index a7ba55ec..3c76755f 100644 --- a/sensor_msgs/CMakeLists.txt +++ b/sensor_msgs/CMakeLists.txt @@ -64,7 +64,7 @@ if(BUILD_TESTING) ament_lint_auto_find_test_dependencies() endif() -if(cpp_typesupport_target) +if(TARGET "${cpp_typesupport_target}") add_library(${PROJECT_NAME}_library INTERFACE) target_include_directories(${PROJECT_NAME}_library INTERFACE "$"