cmake: add workaround with out of source build
cmake: add workaround with out of source build

Closes #572.

losingle/seafile-client,daodaoliang/seafile-client,wgaalves/seafile-client,lucius-feng/seafile-client,lucius-feng/seafile-client,wgaalves/seafile-client,daodaoliang/seafile-client,daodaoliang/seafile-client,haiwen/seafile-client,lucius-feng/seafile-client,lucius-feng/seafile-client,haiwen/seafile-client,wgaalves/seafile-client,wgaalves/seafile-client,losingle/seafile-client,haiwen/seafile-client,losingle/seafile-client,daodaoliang/seafile-client,haiwen/seafile-client,losingle/seafile-client