Closed issue by krab on void-packages repository https://github.com/void-linux/void-packages/issues/34803 Description: ### System * xuname: `Void 5.15.11-xanmod1_1 x86_64 GenuineIntel notuptodate rrFFF` * package: `qt5-sql-5.15.3+20211001_1` I'm building a local package for qt5 software that uses qt5sql-sqlite plugin in it sources. So currently I have to specify all qt5-sql plugins like `qt5-plugin-sqlite` etc. in `template` file to make package. Because if you look at `Qt5SqlConfig.cmake` file, it uses `GLOB` CMake function: ``` # In Qt 5.15 the glob pattern was relaxed to also catch plugins not literally named Plugin. # Define QT5_STRICT_PLUGIN_GLOB or ModuleName_STRICT_PLUGIN_GLOB to revert to old behavior. if (QT5_STRICT_PLUGIN_GLOB OR Qt5Sql_STRICT_PLUGIN_GLOB) file(GLOB pluginTargets "${CMAKE_CURRENT_LIST_DIR}/Qt5Sql_*Plugin.cmake") else() file(GLOB pluginTargets "${CMAKE_CURRENT_LIST_DIR}/Qt5Sql_*.cmake") endif() ``` So it's trying to find every single `.so` file from `Qt5Sql_Q***DriverPlugin.cmake` file. But they don't exist, they separated into packages like `qt5-plugin-sqlite` etc. and configuration fails with: ``` macro(_qt5_Sql_check_file_exists file) if(NOT EXISTS "${file}" ) message(FATAL_ERROR "The imported target \"Qt5::Sql\" references the file \"${file}\" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained \"${CMAKE_CURRENT_LIST_FILE}\" but not all the files it references. ") endif() endmacro() ``` The solution I'm suggesting is: - [ ] Move `Qt5SqlConfig.cmake Qt5SqlConfigVersion.cmake` from `/usr/lib/cmake/Qt5Sql/` (`qt5-sql` package) into `qt5-sql-devel` package. - [ ] Move all `Qt5Sql_QMYSQLDriverPlugin.cmake Qt5Sql_QODBCDriverPlugin.cmake Qt5Sql_QPSQLDriverPlugin.cmake Qt5Sql_QSQLiteDriverPlugin.cmake Qt5Sql_QTDSDriverPlugin.cmake` from `qt5-sql` package into `qt5-plugin-*-devel` subpackages for example: `Qt5Sql_QSQLiteDriverPlugin.cmake` file into `qt5-plugin-sqlite-devel` etc. That way to build software, we can specify single `qt5-plugin-sqlite-devel` as `makedepends` and `qt5-plugin-sqlite` as `depends` and don't list all of qt5sql plugins in template.