I just noticed that the prefix, exec_prefix, libdir and includedir entries in glew.pc and glewmx.pc remain set to the destroot values, instead of to the final destination. I'm not sure yet, but this may explain why cmake doesn't (always) detect the package.