From 56865f3a89c55c4fb71bdd4ba99bdf2604ac30e0 Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 6 Sep 2023 17:32:53 +0200 Subject: [PATCH] Add one hard-coded fallback search paths for icon themes The `CMAKE_INSTALL_DATAROOTDIR` variable might be overridden by the project to point to some custom location (e.g. `share/games` instead of `share`) but this doesn't mean we will be able to find icons there. Since icons are almost always under `/usr/share/icons` it makes sense to add that location as one last hard-coded fallback to avoid having to specify `BUILTIN_ICON_THEMES_SEARCH_PATH` in that common case. --- cmake/modules/QtConfig.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/modules/QtConfig.cmake b/cmake/modules/QtConfig.cmake index 18fc3e9..fd33315 100644 --- a/cmake/modules/QtConfig.cmake +++ b/cmake/modules/QtConfig.cmake @@ -521,6 +521,9 @@ if (REQUIRED_ICONS) list(APPEND ICON_SEARCH_PATHS "${CMAKE_INSTALL_FULL_DATAROOTDIR}/icons") list(APPEND ICON_SEARCH_PATHS "/usr/${CMAKE_INSTALL_DATAROOTDIR}/icons") # find icons from regular prefix when # cross- compiling + list(APPEND ICON_SEARCH_PATHS "/usr/share/icons") # the project might change CMAKE_…_DATAROOTDIR + # to something custom so let's add one hardcoded fallback + list(REMOVE_DUPLICATES ICON_SEARCH_PATHS) set(BUILTIN_ICONS_DIR "${CMAKE_CURRENT_BINARY_DIR}/icons") set(DEFAULT_THEME_INDEX_FILE "${BUILTIN_ICONS_DIR}/default/index.theme")