CMake buildsystem

i was curious if it would take much. this builds and pass the "test" on linux and probably other platforms.