Added file for build with CMake. Fix datatype from int to size_t.