If the target names differ, it will not work.
As workaround, you can create virtual targets, which are named the same in both projects, and make the appropriate real targets members of them.
For example gcc_shared_release and gcc_bin_release can be member of a virtual target called gcc_release, that exists in both projects.
If you now compile gcc_release, the dependencies should work.