cmake support for dyndep capability of ninja for own targets

No, there is no exposed support for dyndep support in add_custom_command. Generally, this requires more infrastructure and would not be a trivial addition.

That said, are you sure you need dyndep? What are you doing that you would need it? Usually add_custom_command(DEPFILE) would be sufficient.