Fixed some errors in the CMake compiling.