Revamp build system

Use CMake instead of GNU autotools

Change-Id: I7a187cb6bf732b5858163192c0c8743359a8a3ad