Add option for built-in SVG icon support

This commit is contained in:
Martchus 2016-08-19 22:37:43 +02:00
parent d97e112f0d
commit 9e61cf8e18
3 changed files with 9 additions and 6 deletions

View File

@ -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

View File

@ -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)

View File

@ -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 <QtPlugin>
@ -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