more work on cmake refactoring