cmake: out-of-source build/install fixes