iCloud & iCloud Photos · iCloud Photos and the Photos library
Does iCloud Photos sync every Photos library on my Mac?
Short answer: No. iCloud Photos syncs only the System Photo Library set in Photos → Settings → General. Other libraries stay local. To change it, open that library with Option held and choose Use as System Photo Library.
No. iCloud Photos only syncs the System Photo Library — the one Photos is set to use in Photos → Settings → General. Any other library on your Mac or on an external drive stays local and isn't uploaded.
To switch which library syncs, open that library (hold Option while opening Photos), then click Use as System Photo Library. Be careful: switching can mean a large upload or download, and merging libraries isn't automatic.
If you've moved your library to an external drive, make sure that copy is the System Photo Library, or iCloud Photos won't follow it. See moving the Photos library.