Add option for built-in SVG icon support
This commit is contained in:
parent
d97e112f0d
commit
9e61cf8e18
|
@ -8,10 +8,10 @@ set(HEADER_FILES
|
||||||
misc/adoptlocker.h
|
misc/adoptlocker.h
|
||||||
misc/dialogutils.h
|
misc/dialogutils.h
|
||||||
misc/desktoputils.h
|
misc/desktoputils.h
|
||||||
misc/importplugin.h
|
|
||||||
models/checklistmodel.h
|
models/checklistmodel.h
|
||||||
resources/qtconfigarguments.h
|
resources/qtconfigarguments.h
|
||||||
resources/resources.h
|
resources/resources.h
|
||||||
|
resources/importplugin.h
|
||||||
)
|
)
|
||||||
set(SRC_FILES
|
set(SRC_FILES
|
||||||
misc/dialogutils.cpp
|
misc/dialogutils.cpp
|
||||||
|
|
|
@ -50,8 +50,6 @@ if(WIDGETS_GUI OR QUICK_GUI)
|
||||||
list(APPEND ADDITIONAL_HEADER_FILES ${GUI_HEADER_FILES})
|
list(APPEND ADDITIONAL_HEADER_FILES ${GUI_HEADER_FILES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# add option for enabling/disabling svg support
|
# add option for enabling/disabling static Qt plugins
|
||||||
option(SVG_SUPPORT "enables/disables svg support (only affects static builds where QSvgPlugin will be built-in if enabled)" ON)
|
option(SVG_SUPPORT "enables/disables svg support for Qt GUI (only affects static builds where QSvgPlugin will be built-in if enabled)" ON)
|
||||||
if(SVG_SUPPORT)
|
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)
|
||||||
add_definitions(-DSVG_SUPPORT)
|
|
||||||
endif()
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef MISC_UTILS_IMPORT_PLUGIN_H
|
#ifndef MISC_UTILS_IMPORT_PLUGIN_H
|
||||||
#define MISC_UTILS_IMPORT_PLUGIN_H
|
#define MISC_UTILS_IMPORT_PLUGIN_H
|
||||||
|
|
||||||
|
#include "resources/config.h"
|
||||||
|
|
||||||
#ifdef QT_STATIC
|
#ifdef QT_STATIC
|
||||||
# if defined(GUI_QTWIDGETS) || defined(GUI_QTQUICK)
|
# if defined(GUI_QTWIDGETS) || defined(GUI_QTQUICK)
|
||||||
# include <QtPlugin>
|
# include <QtPlugin>
|
||||||
|
@ -10,6 +12,9 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
|
||||||
# ifdef SVG_SUPPORT
|
# ifdef SVG_SUPPORT
|
||||||
Q_IMPORT_PLUGIN(QSvgPlugin)
|
Q_IMPORT_PLUGIN(QSvgPlugin)
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef SVG_ICON_SUPPORT
|
||||||
|
Q_IMPORT_PLUGIN(QSvgIconPlugin)
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue