Mine used to do that when we were living in the condo because I seldom leave the house and when I do, I usually bring him along. So when I don't, he is not used to it and will cry. Now that we are living in a house, I just put a couch near the window and when I leave he goes and hang out on the couch like a cat and wait for me to come home
When he gets tired, he sleeps on the couch. All I need to do before I leave is tell him to "go see" and he will go to his special spot. No more crying.