Changed build system from Makefile to CMake