From 3caf7deabf3d8dee27ffb3b1fe9889c92dbcf3c2 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 15 Jun 2021 22:39:40 +0200 Subject: [PATCH] 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). --- Rakefile | 3 ++- rake.d/target.rb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 643e1d4dd..58b7c4e02 100644 --- a/Rakefile +++ b/Rakefile @@ -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). diff --git a/rake.d/target.rb b/rake.d/target.rb index 50ed4e7fa..3a1d1f4fc 100644 --- a/rake.d/target.rb +++ b/rake.d/target.rb @@ -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' ]