Steinar Gunderson suggested to me the pthreads message from cmake is misleading, and the real problem is that libxrandr-dev is not installed. Can you try again with this library installed to see if it solve the problem for you?
-- Happy hacking Petter Reinholdtsen