add cmake script and adjust solution