I've had a lot of problems with this too. I've tried the bamboo canes, small ones pushed into the ground, and thorny prunings. These do work but don't look very nice in my opinion and I find it tiresome after a while.
People will tell you the following does not work but it always has for me, and I've been using it on and off for years now. Essence of Lion dung pellets. Yes they are expensive to buy, 6 to 7 pounds a box and you will hear lots of reports of how it's a waste of money. My experience is that, you need to give these pellets time to work, about 3 weeks or so and if you have a large garden 1 box may not be enough. I find once the initial period has passed and the cat's have gone away, it lasts for at least 6 months or more before needing to apply again. You also don't notice it's there but you do need to apply it thickly. It's worth a go but patience is required as cats will compete with it for the first few weeks and it needs to be applied everywhere, including over shingled ground.
An alternative is to leave no soil showing by planting thick ground cover all over the place. Perennial Geraniums are good for this - masses of them but a garden like that can look chock full and crowded for some tastes.