Error: Unknown CMake command "rosidl_get_typesupport_target" when building cmrosutils with ROS2 Foxy and CarMaker 13.0.1

I’m encountering an error during the build process for my ROS2 workspace integrated with CarMaker 13.0.1. The specific error is:

CMake Error at CMakeLists.txt:77 (rosidl_get_typesupport_target): Unknown CMake command "rosidl_get_typesupport_target".

I’ve ensured ROS2 Foxy is installed and sourced, and I’m on Ubuntu 20.04.6 LTS.

Has anyone faced this issue or know if there are additional dependencies or configurations needed to resolve this?

Thanks.