Moved to CMake, fixed a few include errors