Bug 703434 - Add support for Qt resource files (qrc) which possible to pre-compile with rcc compiler. r=glandium

This commit is contained in:
Oleg Romashin 2011-11-17 01:28:33 -05:00
parent dd515eafc6
commit d7705e8ae7
4 changed files with 21 additions and 5 deletions

View File

@ -179,7 +179,8 @@ NS_PRINTING = @NS_PRINTING@
MOZ_PDF_PRINTING = @MOZ_PDF_PRINTING@
MOZ_CRASHREPORTER = @MOZ_CRASHREPORTER@
MOZ_HELP_VIEWER = @MOZ_HELP_VIEWER@
MOC= @MOC@
MOC = @MOC@
RCC = @RCC@
MOZ_NSS_PATCH = @MOZ_NSS_PATCH@
MOZ_WEBGL = @MOZ_WEBGL@
MOZ_ANGLE = @MOZ_ANGLE@

View File

@ -447,6 +447,7 @@ ALL_TRASH_DIRS = \
ifdef QTDIR
GARBAGE += $(MOCSRCS)
GARBAGE += $(RCCSRCS)
endif
ifdef SIMPLE_PROGRAMS
@ -1183,12 +1184,14 @@ host_%.$(OBJ_SUFFIX): %.mm $(GLOBAL_DEPS)
# 'moc' only knows about #defines it gets on the command line (-D...), not in
# included headers like mozilla-config.h
moc_%.cpp: %.h $(GLOBAL_DEPS)
$(MOC) $(DEFINES) $(ACDEFINES) $< $(OUTOPTION)$@
$(ELOG) $(MOC) $(DEFINES) $(ACDEFINES) $< $(OUTOPTION)$@
moc_%.cc: %.cc $(GLOBAL_DEPS)
$(REPORT_BUILD)
$(ELOG) $(MOC) $(DEFINES) $(ACDEFINES) $(_VPATH_SRCS:.cc=.h) $(OUTOPTION)$@
qrc_%.cpp: %.qrc $(GLOBAL_DEPS)
$(ELOG) $(RCC) -name $* $< $(OUTOPTION)$@
ifdef ASFILES
# The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
# a '-c' flag.

View File

@ -5037,6 +5037,7 @@ then
if test -z "$QTDIR"; then
PKG_CHECK_MODULES(MOZ_QT, QtGui QtNetwork QtCore QtOpenGL)
AC_CHECK_PROGS(HOST_MOC, $MOC moc, "")
AC_CHECK_PROGS(HOST_RCC, $RCC rcc, "")
else
MOZ_QT_LIBS="-L$QTDIR/lib/ -lQtGui -lQtNetwork -lQtCore -lQtXml -lQtOpenGL"
@ -5048,12 +5049,19 @@ then
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtNetwork"
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtXml"
HOST_MOC="$QTDIR/bin/moc"
HOST_RCC="$QTDIR/bin/rcc"
fi
if test -z "$HOST_MOC"; then
AC_MSG_ERROR([No acceptable moc preprocessor found. Qt SDK is not installed or --with-qt is
incorrect])
fi
if test -z "$HOST_RCC"; then
AC_MSG_ERROR([No acceptable rcc preprocessor found. Qt SDK is not installed or --with-qt is
incorrect])
fi
MOC=$HOST_MOC
RCC=$HOST_RCC
MOZ_ENABLE_QMSYSTEM2=
PKG_CHECK_MODULES(_QMSYSTEM2, qmsystem2,
@ -5116,6 +5124,7 @@ AC_SUBST(MOZ_QT_CFLAGS)
AC_SUBST(MOZ_QT_LIBS)
AC_SUBST(MOC)
AC_SUBST(RCC)
AC_SUBST(MOZ_DFB)
AC_SUBST(MOZ_X11)

View File

@ -447,6 +447,7 @@ ALL_TRASH_DIRS = \
ifdef QTDIR
GARBAGE += $(MOCSRCS)
GARBAGE += $(RCCSRCS)
endif
ifdef SIMPLE_PROGRAMS
@ -1183,12 +1184,14 @@ host_%.$(OBJ_SUFFIX): %.mm $(GLOBAL_DEPS)
# 'moc' only knows about #defines it gets on the command line (-D...), not in
# included headers like mozilla-config.h
moc_%.cpp: %.h $(GLOBAL_DEPS)
$(MOC) $(DEFINES) $(ACDEFINES) $< $(OUTOPTION)$@
$(ELOG) $(MOC) $(DEFINES) $(ACDEFINES) $< $(OUTOPTION)$@
moc_%.cc: %.cc $(GLOBAL_DEPS)
$(REPORT_BUILD)
$(ELOG) $(MOC) $(DEFINES) $(ACDEFINES) $(_VPATH_SRCS:.cc=.h) $(OUTOPTION)$@
qrc_%.cpp: %.qrc $(GLOBAL_DEPS)
$(ELOG) $(RCC) -name $* $< $(OUTOPTION)$@
ifdef ASFILES
# The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
# a '-c' flag.