Start using cmake API for easy packaging