$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r81702 - in branches/release: . tools tools/build/v2 tools/build/v2/test/qt4 tools/build/v2/tools
From: jhunold_at_[hidden]
Date: 2012-12-04 04:47:38
Author: jhunold
Date: 2012-12-04 04:47:38 EST (Tue, 04 Dec 2012)
New Revision: 81702
URL: http://svn.boost.org/trac/boost/changeset/81702
Log:
Merge 81687,81688,81689 from ^/trunk
  ------------------------------------------------------------------------
  r81687 | jhunold | 2012-12-03 09:27:30 +0100 (Mo, 03 Dez 2012) | 1 line
  
  Disambiguate rcc calls in preparation for qt5 toolset
  ------------------------------------------------------------------------
  r81688 | jhunold | 2012-12-03 09:27:44 +0100 (Mo, 03 Dez 2012) | 1 line
  
  Adjust external link to qt-project.org
  ------------------------------------------------------------------------
  r81689 | jhunold | 2012-12-03 09:28:09 +0100 (Mo, 03 Dez 2012) | 3 lines
  
  Add <rccflags> to qt4.jam. Fixes #7576
  
  Thanks to Frank Richter for the initial patch and documentation.
  ------------------------------------------------------------------------
Added:
   branches/release/tools/build/v2/test/qt4/rcc.cpp
      - copied unchanged from r81689, /trunk/tools/build/v2/test/qt4/rcc.cpp
   branches/release/tools/build/v2/test/qt4/rcc.qrc
      - copied unchanged from r81689, /trunk/tools/build/v2/test/qt4/rcc.qrc
Properties modified: 
   branches/release/   (props changed)
   branches/release/tools/   (props changed)
   branches/release/tools/build/v2/   (props changed)
Text files modified: 
   branches/release/tools/build/v2/test/qt4/jamroot.jam |     3 +++                                     
   branches/release/tools/build/v2/tools/qt4.jam        |    28 +++++++++++++++++++++++++---            
   2 files changed, 28 insertions(+), 3 deletions(-)
Modified: branches/release/tools/build/v2/test/qt4/jamroot.jam
==============================================================================
--- branches/release/tools/build/v2/test/qt4/jamroot.jam	(original)
+++ branches/release/tools/build/v2/test/qt4/jamroot.jam	2012-12-04 04:47:38 EST (Tue, 04 Dec 2012)
@@ -57,6 +57,9 @@
       # Test moc rule
       [ run mock.cpp mock.h /qt//QtCore : : : <define>TEST_MOCK ]
 
+      # Test resource compiler
+      [ run rcc.cpp rcc.qrc /qt//QtCore : : : <rccflags>"-compress 9 -threshold 10" ]
+
    : # requirements
    : # default-build
    : # usage-requirements
Modified: branches/release/tools/build/v2/tools/qt4.jam
==============================================================================
--- branches/release/tools/build/v2/tools/qt4.jam	(original)
+++ branches/release/tools/build/v2/tools/qt4.jam	2012-12-04 04:47:38 EST (Tue, 04 Dec 2012)
@@ -34,7 +34,23 @@
 # compiled and linked in, you don't need any includes.
 #
 # This is consistent with Qt guidelines:
-# http://doc.trolltech.com/4.0/moc.html
+# http://qt-project.org/doc/qt-4.8/moc.html
+#
+# The .qrc processing utility supports various command line option (see
+# http://qt-project.org/doc/qt-4.8/rcc.html for a complete list). The
+# module provides default arguments for the "output file" and
+# "initialization function name" options. Other options can be set through
+# the <rccflags> build property. E.g. if you wish the compression settings
+# to be more aggressive than the defaults, you can apply them too all .qrc
+# files like this:
+#
+#   project my-qt-project :
+#               requirements
+#               <rccflags>"-compress 9 -threshold 10"
+#           ;
+#
+# Of course, this property can also be specified on individual targets.
+
 
 import modules ;
 import feature ;
@@ -71,6 +87,9 @@
 # Auto-detection via qmake sets '<qt>major.minor.patch'
 feature.feature qt : : propagated ;
 
+# Extra flags for rcc
+feature.feature rccflags : : free ;
+
 project.initialize $(__name__) ;
 project qt ;
 
@@ -221,7 +240,7 @@
             qt4.moc.inc : MOCCABLE_H : OBJ : <allow>qt4 ] ;
 
         # Generates .cpp files from .qrc files.
-        generators.register-standard qt4.rcc : QRC : CPP(qrc_%) ;
+        generators.register-standard qt4.rcc : QRC : CPP(qrc_%) : <allow>qt4 ;
 
         # dependency scanner for wrapped files.
         type.set-scanner QRC : qrc-scanner ;
@@ -691,11 +710,14 @@
 }
 
 
+# Get extra options for RCC
+flags qt4.rcc RCC_OPTIONS <rccflags> ;
+
 # Generates source files from resource files.
 #
 actions rcc
 {
-    $(.BINPREFIX[-1])/rcc $(>) -name $(>:B) -o $(<)
+    $(.BINPREFIX[-1])/rcc $(>) -name $(>:B) $(RCC_OPTIONS) -o $(<)
 }