initial port to cmake