Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20f4ad8a authored by Alexander Stein's avatar Alexander Stein Committed by Michal Marek
Browse files

Fix QT4 moc, cflags libs detection on dual QT3/Qt4 systems



On system with QT3 and QT4 qmake in PATH may be from QT3. So we use
pkg-config for proper QT4 detection.
By reqesting cflags and libs for either QtCore, QtGui and QtSupport include
dirs and libs get listed several times, but so we won't mis anything

Signed-off-by: default avatarAlexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Acked-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent aee08ed4
Loading
Loading
Loading
Loading
+4 −6
Original line number Original line Diff line number Diff line
@@ -273,12 +273,10 @@ $(obj)/.tmp_qtcheck:
	      moc="/usr/bin/moc"; \
	      moc="/usr/bin/moc"; \
	    fi; \
	    fi; \
	else \
	else \
	  headerpath="\$$(shell qmake -query QT_INSTALL_HEADERS)"; \
	  cflags="\$$(shell pkg-config QtCore --cflags) \$$(shell pkg-config QtGui --cflags) \$$(shell pkg-config Qt3Support --cflags)"; \
	  libpath="\$$(shell qmake -query QT_INSTALL_LIBS)"; \
	  libs="\$$(shell pkg-config QtCore --libs) \$$(shell pkg-config QtGui --libs) \$$(shell pkg-config Qt3Support --libs)"; \
	  binpath="\$$(shell qmake -query QT_INSTALL_BINS)"; \
	  binpath="\$$(shell pkg-config QtCore --variable=prefix)"; \
	  cflags="-I$$headerpath -I$$headerpath/QtCore -I$$headerpath/QtGui -I$$headerpath/Qt3Support -DQT3_SUPPORT"; \
	  moc="$$binpath/bin/moc"; \
	  libs="-L$$libpath -Wl,-rpath,$$libpath -lQtCore -lQtGui -lQt3Support"; \
	  moc="$$binpath/moc"; \
	fi; \
	fi; \
	echo "KC_QT_CFLAGS=$$cflags" > $@; \
	echo "KC_QT_CFLAGS=$$cflags" > $@; \
	echo "KC_QT_LIBS=$$libs" >> $@; \
	echo "KC_QT_LIBS=$$libs" >> $@; \