mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add a HEADERS variable to the Makefile
Similar to the qmake variable of the same name, this lists (at least) the headers that may need moc to be run on. Adding more headers is not a problem. Signed-off-by: Thiago Macieira <thiago@macieira.org>
This commit is contained in:
parent
b1c9ed76dc
commit
c8b360c3b5
2 changed files with 11 additions and 1 deletions
10
Makefile
10
Makefile
|
@ -29,6 +29,16 @@ EXTRA_FLAGS = $(QTCXXFLAGS) $(GTKCFLAGS) $(GLIB2CFLAGS) $(XML2CFLAGS) \
|
|||
$(LIBDIVECOMPUTERCFLAGS) \
|
||||
$(LIBSOUPCFLAGS) $(GCONF2CFLAGS)
|
||||
|
||||
HEADERS = \
|
||||
qt-ui/addcylinderdialog.h \
|
||||
qt-ui/divelistview.h \
|
||||
qt-ui/maintab.h \
|
||||
qt-ui/mainwindow.h \
|
||||
qt-ui/models.h \
|
||||
qt-ui/plotareascene.h \
|
||||
qt-ui/starwidget.h \
|
||||
|
||||
|
||||
QTOBJS = qt-ui/maintab.o qt-ui/mainwindow.o qt-ui/plotareascene.o qt-ui/divelistview.o \
|
||||
qt-ui/addcylinderdialog.o qt-ui/models.o qt-ui/starwidget.o
|
||||
|
||||
|
|
2
Rules.mk
2
Rules.mk
|
@ -20,7 +20,7 @@ PRODVERSION_STRING := $(shell $(GET_VERSION) win $(VERSION_STRING) || \
|
|||
MSGOBJS=$(addprefix share/locale/,$(MSGLANGS:.po=.UTF-8/LC_MESSAGES/subsurface.mo))
|
||||
|
||||
# Add the objects for the header files which define QObject subclasses
|
||||
HEADERS_NEEDING_MOC += $(shell grep -l -s 'Q_OBJECT' $(OBJS:.o=.h))
|
||||
HEADERS_NEEDING_MOC += $(shell grep -l -s 'Q_OBJECT' $(HEADERS))
|
||||
MOC_OBJS = $(HEADERS_NEEDING_MOC:.h=.moc.o)
|
||||
|
||||
ALL_OBJS = $(OBJS) $(MOC_OBJS)
|
||||
|
|
Loading…
Add table
Reference in a new issue