migrate to CMake (thanks to @travisghansen)