# HG changeset patch # User Michael Goffioul # Date 1384819889 18000 # Node ID 96c76878c7c6d83d24e969df5e64d4485781af2b # Parent c02b8bf0e1f91f57aa2764ab862706cc944cbf23 Include in C++ files generated from resources. * libgui/Makefile.am (rcc-command): New variable. (qr-%.cc): Use it to translate resources to C++. diff -r c02b8bf0e1f9 -r 96c76878c7c6 libgui/Makefile.am --- a/libgui/Makefile.am Mon Nov 18 15:07:01 2013 -0800 +++ b/libgui/Makefile.am Mon Nov 18 19:11:29 2013 -0500 @@ -94,6 +94,14 @@ mv $@-t $@ endef +define rcc-command +( echo '#ifdef HAVE_CONFIG_H'; \ + echo '#include '; \ + echo '#endif'; \ + $(RCC) $< ) > $@-t +mv $@-t $@ +endef + moc-%.cc: %.h $(moc-command) @@ -101,7 +109,7 @@ $(UIC) -o $@ $< qrc-%.cc: %.qrc - $(RCC) -o $@ $< + $(rcc-command) %.qm: %.ts $(MKDIR_P) languages