From 38edfc0a529adf6182f7d5de8687cdc067cfce2a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 19 Nov 2009 10:51:33 +0000 Subject: [PATCH] 2009-11-19 11:49 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/gtqtc/Makefile * contrib/gtqtc/gtqtcs/Makefile - contrib/gtqtc/moc_gtqtc.cpp ! Fixed to generate moc file dynamically. % Changed to use detect.mk in hbqt for QT detection. * contrib/hbqt/hbqts/Makefile ! Fixed for HB_QT_STATIC=yes mode after latest change. * contrib/hbqt/Makefile * contrib/hbqt/detect.mk * Moved MOC_BIN detection to detect.mk. --- harbour/ChangeLog | 16 +++- harbour/contrib/gtqtc/Makefile | 38 +-------- harbour/contrib/gtqtc/gtqtcs/Makefile | 40 +--------- harbour/contrib/gtqtc/moc_gtqtc.cpp | 106 -------------------------- harbour/contrib/hbqt/Makefile | 6 -- harbour/contrib/hbqt/detect.mk | 6 ++ harbour/contrib/hbqt/hbqts/Makefile | 3 + 7 files changed, 31 insertions(+), 184 deletions(-) delete mode 100644 harbour/contrib/gtqtc/moc_gtqtc.cpp diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c9395d5b52..14f67c70c8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,20 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-19 11:49 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/gtqtc/Makefile + * contrib/gtqtc/gtqtcs/Makefile + - contrib/gtqtc/moc_gtqtc.cpp + ! Fixed to generate moc file dynamically. + % Changed to use detect.mk in hbqt for QT detection. + + * contrib/hbqt/hbqts/Makefile + ! Fixed for HB_QT_STATIC=yes mode after latest change. + + * contrib/hbqt/Makefile + * contrib/hbqt/detect.mk + * Moved MOC_BIN detection to detect.mk. + 2009-11-19 11:34 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/Makefile * Minor adjustment to prev. @@ -26,7 +40,7 @@ - contrib/hbqt/moc_slots.cpp + Added dynamic generation of moc_slots.cpp by calling moc tool. - ; TODO: If this is ok, do the same in gtqtc. + ; TODO: If this is ok, do the same in gtqtc. [DONE] 2009-11-19 09:41 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/gtwvg/Makefile diff --git a/harbour/contrib/gtqtc/Makefile b/harbour/contrib/gtqtc/Makefile index 00b073669e..ee364fce12 100644 --- a/harbour/contrib/gtqtc/Makefile +++ b/harbour/contrib/gtqtc/Makefile @@ -15,41 +15,12 @@ CPP_SOURCES := \ PRG_HEADERS := \ hbgtqtc.ch -# force redetect. needed for _QT_DARWIN trick -HB_HAS_QT := - -_DET_DSP_NAME := qt -_DET_VAR_INC_ := HB_INC_QT -_DET_VAR_HAS_ := HB_HAS_QT -_DET_FLT_PLAT := !dos !os2 -_DET_FLT_COMP := !mingw64 !watcom !bcc !pocc !pocc64 !poccarm !msvcia64 -_DET_INC_DEFP := /usr/include/qt4 /usr/lib/qt4/include /usr/include /Developer/qt/include -_DET_INC_HEAD := /Qt/qglobal.h -include $(TOP)$(ROOT)config/detfun.mk - -_QT_DARWIN := -ifeq ($(HB_PLATFORM),darwin) - ifeq ($(HB_HAS_QT),) - _DET_DSP_NAME := qt - _DET_VAR_INC_ := HB_INC_QT - _DET_VAR_HAS_ := HB_HAS_QT - _DET_INC_DEFP := /Library/Frameworks/QtCore.framework/Versions/4/Headers - _DET_INC_HEAD := /QtCore - include $(TOP)$(ROOT)config/detfun.mk - _QT_DARWIN := yes - endif -endif +include $(TOP)$(ROOT)contrib/hbqt/detect.mk ifneq ($(HB_HAS_QT),) - ifeq ($(_QT_DARWIN),yes) - HB_CFLAGS += -I/Library/Frameworks/QtCore.framework/Headers - HB_CFLAGS += -I/Library/Frameworks/QtGui.framework/Headers - HB_CFLAGS += -I/Library/Frameworks/QtNetwork.framework/Headers - HB_CFLAGS += -I/Library/Frameworks/QtWebKit.framework/Headers - else - 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 +moc_gtqtc.cpp : $(TOP)$(ROOT)contrib/gtqtc/gtqtc.h + $(MOC_BIN) $(TOP)$(ROOT)contrib/gtqtc/gtqtc.h > moc_gtqtc.cpp include $(TOP)$(ROOT)config/header.mk include $(TOP)$(ROOT)config/lib.mk @@ -60,7 +31,4 @@ ifneq ($(HB_HAS_QT),) include $(TOP)$(ROOT)config/dir.mk endif endif -else - HB_SKIP_REASON := $(_DET_RES_TEXT) - include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/gtqtc/gtqtcs/Makefile b/harbour/contrib/gtqtc/gtqtcs/Makefile index 5d5deefdda..40c9698805 100644 --- a/harbour/contrib/gtqtc/gtqtcs/Makefile +++ b/harbour/contrib/gtqtc/gtqtcs/Makefile @@ -18,47 +18,15 @@ CPP_SOURCES := \ PRG_HEADERS := \ hbgtqtc.ch -# force redetect. needed for _QT_DARWIN trick -HB_HAS_QT := - -_DET_DSP_NAME := qt -_DET_VAR_INC_ := HB_INC_QT -_DET_VAR_HAS_ := HB_HAS_QT -_DET_FLT_PLAT := !dos !os2 -_DET_FLT_COMP := !mingw64 !watcom !bcc !pocc !pocc64 !poccarm !msvcia64 -_DET_INC_DEFP := /usr/include/qt4 /usr/lib/qt4/include /usr/include /Developer/qt/include -_DET_INC_HEAD := /Qt/qglobal.h -include $(TOP)$(ROOT)config/detfun.mk - -_QT_DARWIN := -ifeq ($(HB_PLATFORM),darwin) - ifeq ($(HB_HAS_QT),) - _DET_DSP_NAME := qt - _DET_VAR_INC_ := HB_INC_QT - _DET_VAR_HAS_ := HB_HAS_QT - _DET_INC_DEFP := /Library/Frameworks/QtCore.framework/Versions/4/Headers - _DET_INC_HEAD := /QtCore - include $(TOP)$(ROOT)config/detfun.mk - _QT_DARWIN := yes - endif -endif +include $(TOP)$(ROOT)contrib/hbqt/detect.mk ifneq ($(HB_HAS_QT),) - ifeq ($(_QT_DARWIN),yes) - HB_CFLAGS += -I/Library/Frameworks/QtCore.framework/Headers - HB_CFLAGS += -I/Library/Frameworks/QtGui.framework/Headers - HB_CFLAGS += -I/Library/Frameworks/QtNetwork.framework/Headers - HB_CFLAGS += -I/Library/Frameworks/QtWebKit.framework/Headers - else - 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 - HB_CFLAGS += -DQT_NODLL +moc_gtqtc.cpp : $(TOP)$(ROOT)contrib/gtqtc/gtqtc.h + $(MOC_BIN) $(TOP)$(ROOT)contrib/gtqtc/gtqtc.h > moc_gtqtc.cpp + include $(TOP)$(ROOT)config/header.mk include $(TOP)$(ROOT)config/lib.mk -else - HB_SKIP_REASON := $(_DET_RES_TEXT) - include $(TOP)$(ROOT)config/none.mk endif diff --git a/harbour/contrib/gtqtc/moc_gtqtc.cpp b/harbour/contrib/gtqtc/moc_gtqtc.cpp deleted file mode 100644 index 5503251e4e..0000000000 --- a/harbour/contrib/gtqtc/moc_gtqtc.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/**************************************************************************** -** Meta object code from reading C++ file 'gtqtc.h' -** -** Created: Sat May 30 12:14:19 2009 -** by: The Qt Meta Object Compiler version 61 (Qt 4.5.0) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#include "gtqtc.h" -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'gtqtc.h' doesn't include ." -#elif Q_MOC_OUTPUT_REVISION != 61 -#error "This file was generated using the moc from 4.5.0. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif - -QT_BEGIN_MOC_NAMESPACE -static const uint qt_meta_data_DrawingArea[] = { - - // content: - 2, // revision - 0, // classname - 0, 0, // classinfo - 0, 0, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - - 0 // eod -}; - -static const char qt_meta_stringdata_DrawingArea[] = { - "DrawingArea\0" -}; - -const QMetaObject DrawingArea::staticMetaObject = { - { &QWidget::staticMetaObject, qt_meta_stringdata_DrawingArea, - qt_meta_data_DrawingArea, 0 } -}; - -const QMetaObject *DrawingArea::metaObject() const -{ - return &staticMetaObject; -} - -void *DrawingArea::qt_metacast(const char *_clname) -{ - if (!_clname) return 0; - if (!strcmp(_clname, qt_meta_stringdata_DrawingArea)) - return static_cast(const_cast< DrawingArea*>(this)); - return QWidget::qt_metacast(_clname); -} - -int DrawingArea::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QWidget::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - return _id; -} -static const uint qt_meta_data_MainWindow[] = { - - // content: - 2, // revision - 0, // classname - 0, 0, // classinfo - 0, 0, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - - 0 // eod -}; - -static const char qt_meta_stringdata_MainWindow[] = { - "MainWindow\0" -}; - -const QMetaObject MainWindow::staticMetaObject = { - { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow, - qt_meta_data_MainWindow, 0 } -}; - -const QMetaObject *MainWindow::metaObject() const -{ - return &staticMetaObject; -} - -void *MainWindow::qt_metacast(const char *_clname) -{ - if (!_clname) return 0; - if (!strcmp(_clname, qt_meta_stringdata_MainWindow)) - return static_cast(const_cast< MainWindow*>(this)); - return QMainWindow::qt_metacast(_clname); -} - -int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QMainWindow::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - return _id; -} -QT_END_MOC_NAMESPACE diff --git a/harbour/contrib/hbqt/Makefile b/harbour/contrib/hbqt/Makefile index 286d7dd53d..7386998f40 100644 --- a/harbour/contrib/hbqt/Makefile +++ b/harbour/contrib/hbqt/Makefile @@ -18,12 +18,6 @@ include $(TOP)$(ROOT)contrib/hbqt/detect.mk ifneq ($(HB_HAS_QT),) - ifneq ($(filter $(HB_PLATFORM),win wce),) - MOC_BIN := $(HB_HAS_QT)\..\bin\moc.exe - else - MOC_BIN := moc - endif - moc_slots.cpp : $(TOP)$(ROOT)contrib/hbqt/hbqt_slots.h $(MOC_BIN) $(TOP)$(ROOT)contrib/hbqt/hbqt_slots.h > moc_slots.cpp diff --git a/harbour/contrib/hbqt/detect.mk b/harbour/contrib/hbqt/detect.mk index d8cd943bc6..403459d0a8 100644 --- a/harbour/contrib/hbqt/detect.mk +++ b/harbour/contrib/hbqt/detect.mk @@ -36,6 +36,12 @@ ifneq ($(HB_HAS_QT),) else 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 + endif else HB_SKIP_REASON := $(_DET_RES_TEXT) include $(TOP)$(ROOT)config/none.mk diff --git a/harbour/contrib/hbqt/hbqts/Makefile b/harbour/contrib/hbqt/hbqts/Makefile index 0b506299e2..d5e4d64aaa 100644 --- a/harbour/contrib/hbqt/hbqts/Makefile +++ b/harbour/contrib/hbqt/hbqts/Makefile @@ -17,6 +17,9 @@ ifneq ($(HB_HAS_QT),) HB_CFLAGS += -DQT_NODLL +moc_slots.cpp : $(TOP)$(ROOT)contrib/hbqt/hbqt_slots.h + $(MOC_BIN) $(TOP)$(ROOT)contrib/hbqt/hbqt_slots.h > moc_slots.cpp + include $(TOP)$(ROOT)contrib/hbqt/filelist.mk include $(TOP)$(ROOT)config/header.mk