Merge branch 'thoennes/cmake-fixes' into 'master'

Minor cmake fixes

See merge request !452
106 jobs for master in 511 minutes and 59 seconds (queued for 12 seconds)