Ask Your Question

Revision history [back]

How can I tell Colcon about another CMake-based framework?

I'm playing around with ros2arduino and want to have it be a part of the build process like any other node, so I'm trying to set up Arduino-CMake to work with the Colcon build process. Looking through the documentation, it looks like I have to use a colcon.pkg with something like this:

{
  "CMAKE_TOOLCHAIN_FILE": "/my/path/to/Arduino-CMake-Framework/Arduino-Toolchain.cmake"
}

because I want to pass an argument like -DCMAKE_TOOLCHAIN_FILE=/my/path/to/Development/Arduino-CMake-Framework/Arduino-Toolchain.cmake if I was simply calling the equivalent cmake command. But, there's no reference to the cmake variable CMAKE_TOOLCHAIN_FILE when I use this colcon.pkg setup. Unless I have to explicitly tell Colcon about the colcon.pkg? The documentation made it seem like it should detect its presence.

Thanks in advance!