Fix SVG icons not being displayed on Windows.
authorUwe Hermann <uwe@hermann-uwe.de>
Wed, 8 Jan 2014 23:49:47 +0000 (00:49 +0100)
committerUwe Hermann <uwe@hermann-uwe.de>
Thu, 9 Jan 2014 00:07:32 +0000 (01:07 +0100)
commit11a04e2a8ed47ed159b68cbe6f56aedd388e445f
tree98025b36e6a89f0b79c95f6bb7e064c37b7817ac
parent488983533133d3e81f8611ffe4db94e406679403
Fix SVG icons not being displayed on Windows.

On Windows (where we use a static Qt) we need to include plugins
(in this case "qsvg" a.k.a. libqsvg.a from plugins/imageformats/),
otherwise SVGs (such as various icons in PulseView) cannot be displayed.
For this we need to use Q_IMPORT_PLUGIN(qsvg) in the code, pass the
QT_STATICPLUGIN flag to the compiler, and link against "-lqsvg".

This, in turn, requires that we also link against the similarly named QtSvg
component/lib (${QT_QTSVG_LIBRARY} a.k.a libQtSvg.a).

See also: https://qt-project.org/doc/qt-4.8/plugins-howto.html#static-plugins

This fixes bug #239.
CMakeLists.txt
main.cpp