In a pinch use. Consider using stone hardscaping reducing the amount of flat and soft soil surfaces where cats can use as a litter box. Try to seal up or block off any of those spaces that a stray cat may see as ideal for nesting.
Line Your Garden with Chicken Wire. Use Live Traps or the TNR Method. This one would actually help train the cats not to go into the yard. However there are a couple of methods you can use.