Run custom command before some project build in Superbuild

Thank you for reply,

I’ve just read the documentation on ExternalProject_add_step and it seems that this command only adds the steps for targets that are created via ExternalProject_Add.

In my case my project depends on MyDep project that uses add_library() command to create target and to build its dependencies it uses ExternalProject_Add().

I need to run the command after all ExternalProject_Add() dependencies of MyDep are built but before MyDep starts building.

I’m sorry if I confused you

EDIT:
I just understood that probably add_custom_command second use signature may do what I need. Probably I should try that