Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug 703434 - Add support for Qt resource files (qrc) which possible t…

…o pre-compile with rcc compiler. r=glandium
  • Loading branch information...
commit 0eee73cc195da0e88022f56917c1e3d2e1ff07f5 1 parent 6ae59e5
@romaxa romaxa authored
View
3  config/autoconf.mk.in
@@ -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
7 config/rules.mk
@@ -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
9 configure.in
@@ -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
7 js/src/config/rules.mk
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.