You can't do this with gprbuild (for now?). Try to use Alire. It's fantastic for dependency management and can run simple post-fetch, pre-build, post-build actions.