build patches

a set of small patches (one-liners in most cases) affecting the cmake build. Commit messages provide a short description of the purpose for each change.