it's a modified copy of the glfw find script