On a machine with both homebrew and macports, the presence of
macports was causing the homebrew Qt settings to be overwritten
right after they were set. Check to see if QTDIR is already
defined before proceeding with QT macports.
QTDIR :=$(shell brew --prefix)/opt/qt@6
endif # WANT_WIN_QT6
endif # HAVE_HOMEBREW
+ifndef QTDIR
ifeq "$(HAVE_MACPORTS)" "1"
ifdef WANT_WIN_QT5
# Qt5 installed via macports
QTDIR=/opt/local/libexec/qt6
endif # WANT_WIN_QT6
endif # HAVE_MACPORTS
+endif # QTDIR
endif # WANT_WIN_QT
ifndef LIBXPM