Add pthread library to CMakeLists.txt