mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 00:52:16 +00:00
Add <rccflags> to qt4.jam. Fixes #7576
Thanks to Frank Richter for the initial patch and documentation. [SVN r81689]
This commit is contained in:
@@ -57,6 +57,9 @@ if [ qt4.initialized ]
|
||||
# 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
|
||||
|
||||
20
v2/test/qt4/rcc.cpp
Normal file
20
v2/test/qt4/rcc.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
// (c) Copyright Juergen Hunold 2012
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_TEST_MODULE QtCore
|
||||
#include <QtCore>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, QString const& text)
|
||||
{
|
||||
out << text.toUtf8().constData();
|
||||
return out;
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE (check_exists)
|
||||
{
|
||||
BOOST_CHECK(QFile::exists(":/test/rcc.cpp"));
|
||||
}
|
||||
5
v2/test/qt4/rcc.qrc
Normal file
5
v2/test/qt4/rcc.qrc
Normal file
@@ -0,0 +1,5 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="/test/">
|
||||
<file>rcc.cpp</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -36,6 +36,21 @@
|
||||
# This is consistent with Qt guidelines:
|
||||
# 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 ;
|
||||
@@ -72,6 +87,9 @@ feature.feature qt3support : off on : propagated link-incompatible ;
|
||||
# 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 ;
|
||||
|
||||
@@ -701,11 +719,14 @@ actions moc.inc
|
||||
}
|
||||
|
||||
|
||||
# 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 $(<)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user