another take on cmake

still not happy, but here's a checkpoint.