diff --git a/CMakeLists.txt b/CMakeLists.txt index abb764c..9d72090 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,10 +8,10 @@ set(HEADER_FILES misc/adoptlocker.h misc/dialogutils.h misc/desktoputils.h - misc/importplugin.h models/checklistmodel.h resources/qtconfigarguments.h resources/resources.h + resources/importplugin.h ) set(SRC_FILES misc/dialogutils.cpp diff --git a/cmake/modules/QtGuiConfig.cmake b/cmake/modules/QtGuiConfig.cmake index 30f8d7a..ffc4c21 100644 --- a/cmake/modules/QtGuiConfig.cmake +++ b/cmake/modules/QtGuiConfig.cmake @@ -50,8 +50,6 @@ if(WIDGETS_GUI OR QUICK_GUI) list(APPEND ADDITIONAL_HEADER_FILES ${GUI_HEADER_FILES}) endif() -# add option for enabling/disabling svg support -option(SVG_SUPPORT "enables/disables svg support (only affects static builds where QSvgPlugin will be built-in if enabled)" ON) -if(SVG_SUPPORT) - add_definitions(-DSVG_SUPPORT) -endif() +# add option for enabling/disabling static Qt plugins +option(SVG_SUPPORT "enables/disables svg support for Qt GUI (only affects static builds where QSvgPlugin will be built-in if enabled)" ON) +option(SVG_ICON_SUPPORT "enables/disables svg icon support for Qt GUI (only affects static builds where QSvgPlugin will be built-in if enabled)" ON) diff --git a/misc/importplugin.h b/resources/importplugin.h similarity index 78% rename from misc/importplugin.h rename to resources/importplugin.h index ad8213d..2c94290 100644 --- a/misc/importplugin.h +++ b/resources/importplugin.h @@ -1,6 +1,8 @@ #ifndef MISC_UTILS_IMPORT_PLUGIN_H #define MISC_UTILS_IMPORT_PLUGIN_H +#include "resources/config.h" + #ifdef QT_STATIC # if defined(GUI_QTWIDGETS) || defined(GUI_QTQUICK) # include @@ -10,6 +12,9 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) # ifdef SVG_SUPPORT Q_IMPORT_PLUGIN(QSvgPlugin) # endif +# ifdef SVG_ICON_SUPPORT +Q_IMPORT_PLUGIN(QSvgIconPlugin) +# endif # endif #endif