fixed to not try to build dynamic target if dependency isn't satisfied