Fix CMake compile and add an install target

Get rid of the old project-wide Makefile.