fix cmake warning, fix fpic warnings on windows