Removed unnecessary libraries in cmake.