From f4de1a2cc3edfbf2057947812ecac031c054965e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 19 Nov 2009 17:53:10 +0000 Subject: [PATCH] 2009-11-19 18:48 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/detect.mk + Added more sophisticated autodetection of moc executable. Please test on you system. Envvar HB_QT_MOC_BIN can always be used to specify the name of QT 'moc' executable, so if autodetection fails, please use it and report the value that worked for you. --- harbour/ChangeLog | 8 ++++++++ harbour/contrib/hbqt/detect.mk | 24 ++++++++++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 56185a57e4..3e963ee6ae 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-19 18:48 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbqt/detect.mk + + Added more sophisticated autodetection of moc + executable. Please test on you system. + Envvar HB_QT_MOC_BIN can always be used to specify the + name of QT 'moc' executable, so if autodetection fails, + please use it and report the value that worked for you. + 2009-11-19 17:06 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/errapi.c * contrib/hbct/ctc.c diff --git a/harbour/contrib/hbqt/detect.mk b/harbour/contrib/hbqt/detect.mk index 403459d0a8..d29570dc09 100644 --- a/harbour/contrib/hbqt/detect.mk +++ b/harbour/contrib/hbqt/detect.mk @@ -37,10 +37,26 @@ ifneq ($(HB_HAS_QT),) HB_CFLAGS += $(foreach d,$(HB_HAS_QT),-I$(d) -I$(d)/Qt -I$(d)/QtCore -I$(d)/QtGui -I$(d)/QtNetwork -I$(d)/QtWebKit) endif - ifneq ($(filter $(HB_PLATFORM),win wce),) - MOC_BIN := $(HB_HAS_QT)\..\bin\moc.exe - else - MOC_BIN := moc + # Locate 'moc' executable + ifeq ($(MOC_BIN),) + ifeq ($(HB_QT_MOC_BIN),) + ifneq ($(filter $(HB_PLATFORM),win wce),) + MOC_BIN := $(HB_HAS_QT)\..\bin\moc.exe + else + MOC_BIN := $(firstword $(call find_in_path_par,moc,$(PATH) /opt/qtsdk/qt/bin)) + ifeq ($(MOC_BIN),) + MOC_BIN := $(firstword $(call find_in_path_par,moc-qt4,$(PATH) /opt/qtsdk/qt/bin)) + ifeq ($(MOC_BIN),) + $(error ! HB_QT_MOC_BIN not set, could not autodetect) + endif + endif + endif + $(info ! Using QT 'moc' bin: $(MOC_BIN) (autodetected)) + else + MOC_BIN := $(HB_QT_MOC_BIN) + $(info ! Using QT 'moc' bin: $(MOC_BIN)) + endif + export MOC_BIN endif else HB_SKIP_REASON := $(_DET_RES_TEXT)