A military base might have robotic sentry guns [1] to begin with, as they are already armed with these today to defend against incoming mortars. Later on, I imagine with offensive drone capabilities being developed, it will lead to repurposing the drones in a defensive posture. Perhaps the best answer is to scale with the threat.
The defensive drone fleet circle the base. Upon a detection of an incoming fleet, rather than one sentry gun taking on 100 or 1000 drones, a defensive swarm targets the incoming swarm. More of a one-to-one fight or perhaps 1:4 if your drones are more capable fighters.
This is all a bit of a bummer. We talk about how we'll get robots to obey the three laws of robotics, but it'd be nice if we could just get humans to follow the first law. "A robot (human) may not injure a human being or, through inaction, allow a human being to come to harm."