Implement basic CMake build system

This still does not include the `clean` and `uninstall` targets, but we can add those later.