I think if overall development is the goal, you probably need a few more exercises in your arsenal besides just squatting. Like any exercise, this is going to be very person specific.
I still believe that, for a large majority, nothing will pack on size to a person's legs more effectively than heavy, deep squatting - but you really have to experiment a bit and find the exercises that are well suited to you and allow you to make continual progress on. For me, I hate the leg press....I've only found a couple of machines that felt "right" to me - so for most part - squats, hack squats and v-squat machine are my choice.
If all you have is a barbell - then squats and variations of squats (front squats...etc.) are going to be your best bet. Put it this way, I've never seen a dude who can squat 140, 160, 180, 200+...etc. or front squat decent weights for sets of 10-20 reps lacking in the legs department in terms of overall mass....but I've seen plenty of dudes who load up the leg press machine and all these other fancy machines week in week out with shitty legs. I'm not sure if that's down to the exercise selection or to the differences in how people actually train/progress...etc.
It's all a matter of context I guess. There is no need to limit yourself to ONE exercise unless you don't have any other choice available to you.