From e0c58b4a269610d7dc724a93ceeb993cd6cfd9c0 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Fri, 9 May 2025 20:21:28 +0800 Subject: [PATCH 3/3] nview.pro: fix for Qt4 case --- nview.pro | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git nview.pro nview.pro index 710ad69..26f03d8 100644 --- nview.pro +++ nview.pro @@ -1,7 +1,9 @@ TARGET = nview TEMPLATE = app CONFIG += c++11 debug cmdline -QT += core gui widgets +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets SOURCES = src/application.cpp \ src/main.cpp \ @@ -15,6 +17,11 @@ HEADERS = src/application.h \ FORMS = src/mainwindow.ui +lessThan(QT_MAJOR_VERSION, 5) { + # Use external libQtMimeTypes in a case of Qt4 + QMAKE_LFLAGS += -lQtMimeTypes +} + isEmpty(PREFIX) { PREFIX = /usr/local } @@ -25,4 +32,3 @@ manpage.path = $$PREFIX/share/man/man1 manpage.files = res/nview.1 INSTALLS += target manpage -