Can you benefit from Horde Breaker if you attack as part of Booming Blade or Green Flame Blade?

The booming blade and green-flame blade cantrips from the Sword Coast Adventurer’s Guide both have the particularity of including a single melee weapon attack as part of their casting.

Several martial abilities, like Extra Attack or the Martial Arts’s bonus attack, do not work with these cantrips because they require the Attack action to be used.

However, the Hunter Ranger’s Horde Breaker ability (which lets you do an additional attack on another target with the same weapon once per turn) only requires an attack with a weapon, not necessarily the Attack action. Therefore, I’m wondering if a Hunter Ranger with Horde Breaker could get that additional-attack-on-different-target-with-same-weapon when using booming blade or green-flame blade.