Remove 3rdparty dependencies and migrate build chain to cmake