build system: link command line applications against Qt's core library

This is in preparation of fixing #3137. The plan is not to use
libfile's MIME type detection but Qt's. As both mkvmerge and the GUI
need to auto-detect the MIME type, this means that the command line
applications will have to be linked against Qt's core library (but not
the GUI libraries).
This commit is contained in:
Moritz Bunkus 2021-06-15 22:39:40 +02:00
parent 783229560f
commit 3caf7deabf
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
2 changed files with 3 additions and 1 deletions

View File

@ -1069,6 +1069,7 @@ $common_libs = [
:fmt,
:pcre2,
:stdcppfs,
:qt_non_gui,
"-lstdc++",
]
@ -1182,7 +1183,7 @@ if $build_mkvtoolnix_gui
qt_dependencies_and_sources("mkvtoolnix-gui").
sources("src/mkvtoolnix-gui/qt_resources.cpp").
sources("src/mkvtoolnix-gui/resources.o", :if => $building_for[:windows]).
libraries($common_libs, :qt).
libraries($common_libs - [ :qt_non_gui ], :qt).
libraries("-mwindows", :powrprof, :if => $building_for[:windows]).
libraries("-framework IOKit", :if => $building_for[:macos]).
libraries($custom_libs).

View File

@ -166,6 +166,7 @@ class Target
when :pcre2 then c(:PCRE2_LIBS)
when :pugixml then c?(:PUGIXML_INTERNAL) ? [ '-Llib/pugixml/src', '-lpugixml' ] : c(:PUGIXML_LIBS)
when :qt then c(:QT_LIBS)
when :qt_non_gui then c(:QT_LIBS_NON_GUI)
when :static then c(:LINK_STATICALLY)
when :stdcppfs then c(:STDCPPFS_LIBS)
when :mpegparser then [ '-Lsrc/mpegparser', '-lmpegparser' ]