Originally coming from KWin, but now also needed by qtbase.
Not as such at this point, but the CMake port of Qt (see wip/cmake branch in qtbase) for Qt6 currently copies CMake files from multiple KDE repositories, or duplicates existing modules. I'm trying to unify that to just ECM as the canonical source, which should simplify collaboration with the Qt team.
If you use IMPORTED_TARGET you can skip most stuff below. i.e.
In fact, I'd argue it's just easier to have pkg_check_modules called upstream rather than having an intermediary in ECM or so.
Could the indentation perhaps be turned to be 4 spaces while copying it here? While https://community.kde.org/Policies/CMake_Coding_Style#Indentation allows the choice of 2,3, or 4 spaces, using 4 is more in line with the indentation used in C++ sources, so IMHO more expected to read.
Please also add a docs/find-module/FindFontconfig.rst with a line linking this file:
.. ecm-module:: ../../find-modules/FindFontconfig.cmake
so the documentation generation will cover also this new module.
When it comes to pkgconfig no idea myself, but please update https://community.kde.org/Policies/CMake_Coding_Style#.28Not.29_Using_pkg-config if you find those rules do no longer apply.
Confirmed on a clean rebuild here too. So this needs backward compat variables too.
What I don't understand though is which FindFontconfig this used to find, there is non in plasma-desktop...