fix name of cmake curses package
fix lib inclusions and cmake some more
change build directory to cwd