I see "~/qt4" and "branch 4.8" in kdesrc-build-setup (and the qt 4 git repo), it looks like it should be updated. I was looking at this when trying to help a new kdesrc-build user on IRC, and it made me wonder about something else: when people install qt in a custom dir like ~/qt5, I think they need to pass -DCMAKE_PREFIX_PATH=$HOME/qt5 to cmake so that qt5 is picked up, right? That's something kdesrc-build could do automatically based on the value of "qtdir" ... Reproducible: Always
Admittedly it's been awhile since I checked this, but my understanding was that Qt5's cmake modules could be found based on qmake-qt5 output alone, even with default CMake modules. Still this is a good question, as I'd have no way to catch this ordinarily if I'm wrong, since my Qt5 is installed to my KF5 prefix and thus would be picked up in any event.
FindQt4.cmake was using qmake. Qt5 installs cmake config files, which cmake picks up using CMAKE_PREFIX_PATH unless it's in a standard location. qmake is not involved at all (except in the bit of code in ECM that uses qmake -query to find out where the qt plugins are installed, but that's very minor). I'm 100% sure that CMAKE_PREFIX_PATH should be set.
Git commit c8b6869f556530ff2f92d2df8f7bab160d1ef40d by Michael Pyne. Committed on 04/10/2016 at 02:05. Pushed by mpyne into branch 'master'. setup: Migrate Qt 4 references to Qt 5. FIXED-IN:16.10 M +46 -119 kdesrc-build-setup http://commits.kde.org/kdesrc-build/c8b6869f556530ff2f92d2df8f7bab160d1ef40d
Git commit 2e62dc7e15cee8fc881fc5306e42861ce02d912d by Michael Pyne. Committed on 08/10/2016 at 19:39. Pushed by mpyne into branch 'master'. Point CMake to Qt's cmake module directory if different from KF5's I still need to fix kdesrc-build-setup though. :( M +6 -10 modules/ksb/BuildSystem.pm M +17 -6 modules/ksb/BuildSystem/KDE4.pm M +4 -26 modules/ksb/Module.pm M +4 -2 modules/ksb/l10nSystem.pm http://commits.kde.org/kdesrc-build/2e62dc7e15cee8fc881fc5306e42861ce02d912d