Fixed build script and the CMake file