Build fixes for Qt5 Windows/mingw/MXE support.
authorUwe Hermann <uwe@hermann-uwe.de>
Sun, 29 Jan 2017 18:36:59 +0000 (19:36 +0100)
committerUwe Hermann <uwe@hermann-uwe.de>
Sun, 29 Jan 2017 18:48:42 +0000 (19:48 +0100)
commit09f55d9665efb3b17ba7de4bae47be6989e884fe
treef043b94f9876a7bb1f5ca62e03a195c038f4b2d1
parenta2b9ac403cb540b5c6499d00d3d376384ec6c94f
Build fixes for Qt5 Windows/mingw/MXE support.

We currently need to (ab)use pkg-config to get all the required
Qt5 static linking dependencies right, since this doesn't yet
work properly in MXE's cmake.

We use ${PKGDEPS_STATIC_LDFLAGS} instead of ${PKGDEPS_STATIC_LIBRARIES}
to avoid some linker issues related to libbz2.

We need to add Qt5::QSvgPlugin, Qt5::QWindowsIntegrationPlugin,
Qt5PlatformSupport and all the Qt5 libs and their dependencies to
the link libraries list (for both PulseView and the unit tests).

In one of the source code files we need to explicitly list all
static Qt plugins via Q_IMPORT_PLUGIN to make static builds work,
which is currently QWindowsIntegrationPlugin and QSvgPlugin.

We're only focusing on having a working Qt5 build for Windows,
as we no longer need to or want to support Qt4 there.

Details:
https://github.com/mxe/mxe/issues/1642

Thanks to Tony Theodore for the help!

This should also fix bug #871, since we're now building with Qt >= 5.6
which has high-DPI support in general.

Tested via manual specification (might need further changes, though):

  set QT_SCALE_FACTOR=2
  pulseview.exe
CMakeLists.txt
main.cpp