DEveloping custom mavlink from PX4 to QGC

I am currently using PX4 messages (px4_msgs) version 1.16 along with QGroundControl (QGC) version 5.0.8. I have created a custom message in PX4 and modified the PX4 messages to incorporate functionality The communication within PX4 works correctly, and the new MAVLink message is successfully generated and sent from PX4.

However, QGC does not recognize the new MAVLink message, because it relies on MAVLink definitions that differ from the ones created . To address this, I have attempted to clone the MAVLink headers and point QGC to these headers via the CMakeLists (rather than github), so that both PX4 and QGC would use a consistent set of MAVLink definitions.

Despite this, when building, I encounter errors indicating that certain MAVLink commands are missing, even though they are defined in ardupilotmega.xml or other MAVLink XML definition files.

What do you think might be the issue and how to resolve this?