Change from makefile to CMake