We did a feasibility assessment in Castro Valley today where a question came up about setbacks from the main house and other structures on the property, including a pool! Alameda County requires an 8 foot setback from the main residence, which can only be reduced to make room for the state exemption ADU which is up to 800sf. Other structures on the property, however, like this greenhouse and pool require a setback of 6 feet.
TIP: Setbacks very by jurisdiction so check in with your Building Department to see if their requirements are the same!