Exclude autogenerated CMake files if doing in tree builds
Fix typo in scanForNextEvent()