From dd3ae7b32ba73ffc49f1c494d4fa1b192820b6ff Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 16 Mar 2023 00:46:52 +0100 Subject: [PATCH] Make search path for icon themes configurable --- cmake/modules/QtConfig.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/modules/QtConfig.cmake b/cmake/modules/QtConfig.cmake index 19d4a1f..76be5cc 100644 --- a/cmake/modules/QtConfig.cmake +++ b/cmake/modules/QtConfig.cmake @@ -502,11 +502,15 @@ if (REQUIRED_ICONS) set(BUILTIN_ICON_THEMES "" CACHE STRING "specifies icon themes to be built-in") + set(BUILTIN_ICON_THEMES_SEARCH_PATH + "" + CACHE PATH "specifies the search path for icon themes to be built-in") option(BUILTIN_ICON_THEMES_IN_LIBRARIES "specifies whether icon themes should also be built-in when building libraries" OFF) if (BUILTIN_ICON_THEMES AND (BUILTIN_ICON_THEMES_IN_LIBRARIES OR (NOT "${META_PROJECT_TYPE}" STREQUAL "library"))) set(ICON_THEME_FILES) - set(ICON_SEARCH_PATHS) + set(ICON_SEARCH_PATHS ${BUILTIN_ICON_THEMES_SEARCH_PATH}) + if (CMAKE_FIND_ROOT_PATH) foreach (ROOT_PATH ${CMAKE_FIND_ROOT_PATH}) list(APPEND ICON_SEARCH_PATHS "${ROOT_PATH}/${CMAKE_INSTALL_DATAROOTDIR}/icons")