Yes, if you stick any military equipment on a station, it can no longer be built by industry. You need naval shipyard capacity enough for that particular station.
But, that's not much of a problem because you shouldn't build gigantic military stations anyway. You can build commercial stations for all the purposes which needs very big modules like fuel harvesting, terraforming, maintaining etc. Other than that you can build 10-20k military station to complete your complexes. Military stations can get recreation and maintenance from commercial station's modules and military station brings guns for protection.