The #include <pwd.h> should be protected by #ifdef statements in some way; the current statement will fail on windows. The best solution would be to add a HAVE_GETPWUID check in the cmake setup to check for the function getpwuid().