diff --git a/ament_cmake_core/cmake/core/ament_execute_extensions.cmake b/ament_cmake_core/cmake/core/ament_execute_extensions.cmake index d5607ed4..2f391517 100644 --- a/ament_cmake_core/cmake/core/ament_execute_extensions.cmake +++ b/ament_cmake_core/cmake/core/ament_execute_extensions.cmake @@ -38,10 +38,10 @@ macro(ament_execute_extensions extension_point) "name and cmake filename") endif() list(GET _extension_list 0 _pkg_name) - list(GET _extension_list 1 _cmake_filename) - if(_pkg_name IN_LIST _ARG_EXCLUDE) + if("${_pkg_name}" IN_LIST _ARG_EXCLUDE) continue() endif() + list(GET _extension_list 1 _cmake_filename) set(_extension_file "${${_pkg_name}_DIR}/${_cmake_filename}") assert_file_exists("${_extension_file}" "ament_execute_extensions(${extension_point}) registered extension '${_extension_file}' does not exist")