]> granicus.if.org Git - nethack/commitdiff
linking with Qt6 support on Linux
authornhmall <nhmall@nethack.org>
Thu, 13 Jan 2022 23:27:21 +0000 (18:27 -0500)
committernhmall <nhmall@nethack.org>
Thu, 13 Jan 2022 23:27:21 +0000 (18:27 -0500)
sys/unix/hints/linux.370

index 84b46923ae568eac1111f86b97e2c8a7311cc9e0..04f7bdd45dee4e1b1b95ac182981c0a9c56d720c 100755 (executable)
@@ -140,9 +140,8 @@ LFLAGS=-L/opt/X11/lib
 endif  # WANT_WIN_X11
 
 ifdef WANT_WIN_QT
-# Qt requires C++11
-ifdef WANT_WIN_QT5
 LINK = $(CXX)
+ifdef WANT_WIN_QT5
 QTCXXFLAGS += $(sort $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --cflags))
 WINLIB += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --libs)
 endif   # WANT_WIN_QT5
@@ -166,9 +165,9 @@ QTCXXFLAGS += -I$(QTDIR)/include/QtGui
 QTCXXFLAGS += -I$(QTDIR)/include/QtMultimedia
 QTCXXFLAGS += -I$(QTDIR)/include/QtWidgets
 MOCPATH = $(QTDIR)/libexec/moc
+WINLIB += -L$(QTDIR)/lib -lQt6Widgets -lQt6Multimedia -lQt6Network -lQt6Gui -lQt6Core
 endif
 else   # QT_PACKAGE_AVAILABLE
-LINK = $(CXX)
 QTCXXFLAGS += $(sort $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt6Gui Qt6Widgets Qt6Multimedia --cflags))
 WINLIB += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt6Gui Qt6Widgets Qt6Multimedia --libs)
 endif   # WANT_WIN_QT6