Currently, the FindQt5PlatformSupport and FindQt5ThemeSupport cmake modules use pkg-config to search for the includes files without searching if those files would be available in the default path first (for instance if building against a custom Qt installation and using CMAKE_PREFIX_PATH, and not the version installed on the system).
This change searches for the header filesbecomes a blocking issue with Qt5.11.1 as the prototype of the constructor of some classes changed in the default path first,QtThemeSupport vs Qt 5.9. then defaults to the current behavior of using pkg-configThe library found would be 5.11.1 (CMAKE_PREFIX_PATH) but the header files would be 5.9 (installed on the system and found by pkg-config).
This becomes a blocking issue with Qt5.11.1 as the prototype of the constructor of some classes changedchange searches for the header files in QtThemeSupport vs Qt 5.9.the default path first, The library found would be 5.11.1 (CMAKE_PREFIX_PATH) but the header files would be 5.9 (installed on the system and found by pkg-config)then defaults to the current behavior of using pkg-config.