You need longer brass than the standard .40 S&W case so you can star crimp it,it needs to mimic the OAL of "real" ammo(Blanks are lethal treat as such!!)
Companies like CH Tool & Die/4-D Die Co make special dies for making some of the more popular blank rounds.They will make you anything if you pay the $$$.
Some cartridges are easier to make than others.Some guns are easier than other to blank adapt.
No need for special propellants,standard reloading powders are used normally.We are not talking about Grenade launching blanks,those are a different ball of wax.Some blanks use special proprietary blends of "ingredients" for visual effects.
Making your own blanks is generally uncharted territory.Commercial blank makers for hollyweird and reenactors use their own loads and do not share that data.
Guns like a bolt action rifle or a revolver are easy to blank fire as the mechanism does not need the power of the round to make it work.Semi and full auto guns need blank ammo and some "tweaks" to their mechanisms to make them think they are firing real ammo(treat blanks as live ammo:LETHAL).
Every gun is different,there isn't a universal play book.The Glock would need the barrel restricted at the muzzle,probably different springs and possible redesign of the barrel to make it work.And,blanks tailored for that gun.
As an example;the Colt 1911 style guns need the barrel restricted and the upper lugs removed.A loose fitting barrel bushing and sometimes different hammer and recoil springs.each gun seems to have a "personality" of its own.You are making the 1911 change from recoil to blow back operation.Looser fitting used guns seem to work better and less hassles than newer tighter fitting guns.
Never did a Glock,only 1911,revolvers,bolt guns,M1 rifles/ carbines,1919s and M-2 brownings,Thompson and M3s,Sten and the like.
1911s are one of the harder but not impossible guns to get to work right,I would think your Glock would need "some" of the same treatment.Easier to do 9mm.
***Blanks are dangerous and potentially lethal:treat as if using live ammo.***