Fix build, add CMake generator

Tested and working