This method works for systems where a logind-compatible D-Bus
interface is available for inhibiting sleep & idle states. Requires
Qt's D-Bus library.
Part of the implementation of #2411.
Recent `qmake` versions warn about plugins being added multiple times
via the `QT_PLUGIN` setting. However, our configure must add the
plugins manually as it cannot rely on them being present automatically
in older Qt versions. So just ignore those warnings.
This changes several things:
1. The path to the plugins is no longer determined by looking through
the include flags in QT_LIBS. This process was broken for paths
with file names. Instead, qmake is queried for the installation
location for the plugins.
2. Similar to qmake, configure now generates a file for both mkvinfo
and mkvtoolnix-gui that includes the appropriate #include
directives for the chosen plugins. Therefore no additional #ifdef…
logic is required for the static plugins in other parts of the two
programs.
3. For platforms other than Windows or macOS, configure will now add
the Xcb platform integration plugin. This is required for using a
static Qt on Linux. This change should implement #1898.
The GUI will now cache file identification results on disc. When the
same file is identified a second time the cached results are used
instead leading to a huge speed gain, especially when scanning Blu-ray
playlists multiple times.
Both positive and negative results are cached.
Cache results are invalidated whenever one of the following conditions
is met:
• if the source file's modification time stamp differs from when the
result was cached
• if the source file's size in bytes differs from when the result was
cached
• if the current version of MKVToolNix GUI differs from the version used
to write the cached result
Newer versions of Qt (definitely 5.7.0 but not yet 5.5.1) contain part
of the platform-specific code not in e.g. libqwindows.a but in
libQt5PlatformSupport.a. That library doesn't seem to be mentioned in
the LDFLAGS gathered from pkg-config. But its functionality is actually
required for libqwindows.a.
Therefore look for the library manually and link it if it's found.
Required in at least the static mingw cross-compiled build.
Normally configure uses pkg-config for detecting Qt and setting
QT_CFLAGS and QT_LIBS. With this option configure won't use pkg-config
and rely on the user having set both variables before running
configure. This enables using Qt on systems where no pkg-config files
are generated (e.g. Qt 5.6.0 on MacOS with frameworks enabled).
See https://github.com/Homebrew/homebrew/pull/50234