CMake: Update to latest changes of the code, support linux build