Fix cmake installing wrong files in an out-of-source build