Backport solution for #163 (MR !541) to the bst-1.2 branch

This is needed to both freedesktop-sdk and gnome-build-meta project; It would be nice if this functionality can get backported

Edited by Javier Jardón