Switch to CMake
Split the project in library and executable