changed to CMake instead of single scripts. makes life easier.