fix dependencies build order
Merge pull request #856 from Yozhig/patch-1

build: Fix dependencies build order