Cmake version

Hi,

I have ported your version to a new one that uses cmake for download dependencies and compile source.