--- /var/db/paludis/repositories/qt/eclass/qt5-build.eclass 2014-01-23 16:31:38.564209367 +0400 +++ /work/GitHub/zaufi-overlay/eclass/qt5-build.eclass 2014-02-16 21:29:44.000000000 +0400 @@ -296,6 +296,7 @@ fi qt5_install_module_qconfigs + qt5_regenerate_cmake_extras # remove .la files since we are building only shared libraries prune_libtool_files @@ -600,3 +601,22 @@ ewarn "${qconfig_pri} does not exist or is not a regular file" fi } + +qt5_regenerate_cmake_extras() { + local h + local module + local extras + for h in ${D}${QT5_HEADERDIR}/*; do + # Check if versioned private headers are here + if [ -d "${h}" -a -d "${h}/${PV}" ]; then + module=$(basename "${h}") + extras="${D}${QT5_LIBDIR}/cmake/${module/Qt/Qt5}/ExtraSourceIncludes.cmake" + if [ ! -f "${extras}" ]; then + echo "set(${module/Qt/Qt5}_PRIVATE_INCLUDE_DIRS" > "${extras}" + echo " \"${QT5_HEADERDIR}/${module}/${PV}\"" >> "${extras}" + echo " \"${QT5_HEADERDIR}/${module}/${PV}/${module}\"" >> "${extras}" + echo ")" >> "${extras}" + fi + fi + done +}