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.
This commit is contained in:
parent
490345b2ca
commit
56865f3a89
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue