Switch from makefile to cmake