This will be useful when building GLFW as a CMake object library and linking it into a larger library that exports pkg-config information. Partly based on #1307 by @a3f. Closes #1307.