Changing build system to cmake