autotools support for including moc files

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14715 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-08-16 23:10:31 +00:00
parent 0ba726bb7a
commit 9e87592940
4 changed files with 10 additions and 61 deletions

View File

@ -449,7 +449,6 @@ AC_CONFIG_FILES([Makefile m4/Makefile \
src/frontends/gtk/gimages/Makefile \
src/frontends/gtk/glade/Makefile \
src/frontends/qt3/Makefile \
src/frontends/qt3/moc/Makefile \
src/frontends/qt3/ui/Makefile \
src/frontends/qt3/ui/moc/Makefile \
src/frontends/qt4/Makefile \

View File

@ -1,16 +1,23 @@
include $(top_srcdir)/config/common.am
include $(srcdir)/Makefile.dialogs
SUBDIRS = ui moc
SUBDIRS = ui
EXTRA_DIST = pch.h Makefile.dialogs
BUILT_SOURCES = $(PCH_FILE)
libqt3_la_DEPENDENCIES = $(MOCEDFILES)
MOCEDFILES = $(MOCFILES:.C=_moc.cpp)
%_moc.cpp: %.h
$(MOC) -o $@ $<
BUILT_SOURCES = $(PCH_FILE) $(MOCEDFILES)
noinst_LTLIBRARIES = libqt3.la
libqt3_la_LDFLAGS = $(QT_LDFLAGS)
libqt3_la_LIBADD = $(QT_LIB) ui/*.lo moc/*.lo ui/moc/*.lo
libqt3_la_LIBADD = $(QT_LIB) ui/*.lo ui/moc/*.lo
AM_CPPFLAGS += \
$(QT_CPPFLAGS) \

View File

@ -1,27 +0,0 @@
include $(top_srcdir)/config/common.am
include $(srcdir)/../Makefile.dialogs
DISTCLEANFILES += *.C
EXTRA_DIST = pch.h
BUILT_SOURCES = $(PCH_FILE)
AM_CPPFLAGS += \
$(QT_CPPFLAGS) -DQT_NO_TRANSLATION \
$(PCH_FLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/frontends \
-I$(top_srcdir)/src/frontends/controllers \
-I$(top_builddir)/src/frontends/qt3 \
$(QT_INCLUDES) \
$(BOOST_INCLUDES)
noinst_LTLIBRARIES = libqt3moc.la
nodist_libqt3moc_la_SOURCES = $(MOCFILES:.C=_moc.C)
# The trick.
libqt3moc_la_LINK = touch libqt3moc.la ; echo
%_moc.C: $(srcdir)/../%.h
$(MOC) -o $@ $<

View File

@ -1,30 +0,0 @@
// -*- C++ -*-
#include <config.h>
#include <boost/array.hpp>
#include <boost/assert.hpp>
#include <boost/function.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/signals/trackable.hpp>
#include <boost/signal.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/utility.hpp>
#include <algorithm>
#include <cmath>
#include <iomanip>
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
#include <map>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
// Have I said anything about the braindeadness of QT lately?
// Just to remind you: signals slot emit as macros, pure lunacy!
// So we are not able to have any qt headers in the pch.