⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qt4.jam

📁 Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work
💻 JAM
📖 第 1 页 / 共 2 页
字号:
         # WebKit (Qt 4.4)         add-shared-library QtWebKit : QtGui : QT_WEBKIT_LIB ;         # Phonon Multimedia (Qt 4.4)          add-shared-library phonon : QtGui QtXml : QT_PHONON_LIB ;         # XmlPatterns-Engine (Qt 4.4)          add-shared-library QtXmlPatterns : QtNetwork : QT_XMLPATTERNS_LIB ;         # Help-Engine (Qt 4.4)          add-shared-library QtHelp : QtGui QtSql QtXml ;         # AssistantClient Support         # Compat library         # Pre-4.4 help system, use QtHelp for new programs         add-shared-library QtAssistantClient : QtGui : : : QtAssistant ;    }    project.pop-current ;}rule initialized ( ){    return $(.initialized) ;}# This custom generator is needed because in QT4, UI files are translated only# into H files, and no C++ files are created. Further, the H files need not be# passed via MOC. The header is used only via inclusion. If we define a standard# UI -> H generator, Boost.Build will run MOC on H, and then compile the# resulting cpp. It will give a warning, since output from moc will be empty.## This generator is declared with a UI -> OBJ signature, so it gets invoked when# linking generator tries to convert sources to OBJ, but it produces target of# type H. This is non-standard, but allowed. That header won't be mocced.#class uic-h-generator : generator{    rule __init__ ( * : * )    {        generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;    }    rule run ( project name ? : property-set : sources * )    {        if ! $(name)        {            name = [ $(sources[0]).name ] ;            name = $(name:B) ;        }        local a = [ new action $(sources[1]) : qt4.uic-h : $(property-set) ] ;        # The 'ui_' prefix is to match qmake's default behavior.        local target = [ new file-target ui_$(name) : H : $(project) : $(a) ] ;        local r = [ virtual-target.register $(target) ] ;        # Since this generator will return a H target, the linking generator        # won't use it at all, and won't set any dependency on it. However, we        # need the target to be seen by bjam, so that dependency from sources to        # this generated header is detected -- if jam does not know about this        # target, it won't do anything.        DEPENDS all : [ $(r).actualize ] ;        return $(r) ;    }}class moc-h-generator : generator{    rule __init__ ( * : * )    {        generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;    }    rule run ( project name ? : property-set : sources * )    {        if ! $(sources[2]) && [ $(sources[1]).type ] = MOCCABLE_CPP        {            name = [ $(sources[0]).name ] ;            name = $(name:B) ;            local a = [ new action $(sources[1]) : qt4.moc.inc :                $(property-set) ] ;            local target = [ new file-target $(name) : MOC : $(project) : $(a)                ] ;            local r = [ virtual-target.register $(target) ] ;            # Since this generator will return a H target, the linking generator            # won't use it at all, and won't set any dependency on it. However,            # we need the target to be seen by bjam, so that dependency from            # sources to this generated header is detected -- if jam does not            # know about this target, it won't do anything.            DEPENDS all : [ $(r).actualize ] ;            return $(r) ;        }    }}class moc-inc-generator : generator{    rule __init__ ( * : * )    {        generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;    }    rule run ( project name ? : property-set : sources * )    {        if ! $(sources[2]) && [ $(sources[1]).type ] = MOCCABLE_H        {            name = [ $(sources[0]).name ] ;            name = $(name:B) ;            local a = [ new action $(sources[1]) : qt4.moc.inc :                $(property-set) ] ;            local target = [ new file-target moc_$(name) : CPP : $(project) :                $(a) ] ;            # Since this generator will return a H target, the linking generator            # won't use it at all, and won't set any dependency on it. However,            # we need the target to be seen by bjam, so that dependency from            # sources to this generated header is detected -- if jam does not            # know about this target, it won't do anything.            DEPENDS all : [ $(target).actualize ] ;            return [ virtual-target.register $(target) ] ;        }    }}# Query the installation directory. This is needed in at least two scenarios.# First, when re-using sources from the Qt-Tree. Second, to "install" custom Qt# plugins to the Qt-Tree.#rule directory{    return $(.prefix) ;}# Add a shared Qt library.rule add-shared-library ( lib-name : depends-on * : usage-defines * : requirements * :  include ? ){     add-library $(lib-name) : $(.suffix_version) : $(depends-on) : $(usage-defines) : $(requirements) : $(include) ;}# Add a static Qt library.rule add-static-library ( lib-name : depends-on * : usage-defines * : requirements * : include ? ){     add-library $(lib-name) : : $(depends-on) : $(usage-defines) : $(requirements) : $(include) ;}# Add a Qt library.# Static libs are unversioned, whereas shared libs have the major number as suffix.# Creates both release and debug versions on platforms where both are enabled by Qt configure.# Flags:# - lib-name Qt library Name# - version  Qt major number used as shared library suffix (QtCore4.so)# - depends-on other Qt libraries# - usage-defines those are set by qmake, so set them when using this library# - requirements addional requirements# - include non-canonical include path. The canonical path is $(.incprefix)/$(lib-name).rule add-library ( lib-name : version ? : depends-on * : usage-defines * : requirements * : include ? ){    if $(.bjam-qt)    {        # Import Qt module        # Eveything will be setup there        alias $(lib-name)           : $(.prefix)//$(lib-name)           :           :           : <allow>qt4 ;    }    else    {        local real_include ;        real_include ?= $(include) ;        real_include ?= $(lib-name) ;                lib $(lib-name)            : # sources             $(depends-on)           : # requirements             <name>$(lib-name)$(version)             $(requirements)           : # default-build           : # usage-requirements             <define>$(usage-defines)             <include>$(.incprefix)/$(real_include)           ;                lib $(lib-name)            : # sources             $(depends-on)           : # requirements             <name>$(lib-name)$(.suffix_debug)$(version)             $(requirements)             <variant>debug           : # default-build           : # usage-requirements             <define>$(usage-defines)             <include>$(.incprefix)/$(real_include)           ;    }     # Make library explicit so that a simple <use>qt4 will not bring in everything.    # And some components like QtDBus/Phonon may not be available on all platforms.    explicit $(lib-name) ;}# Get <include> and <defines> from current toolset.flags qt4.moc INCLUDES <include> ;flags qt4.moc DEFINES <define> ;# Processes headers to create Qt MetaObject information. Qt4-moc has its# c++-parser, so pass INCLUDES and DEFINES.#actions moc{    $(.binprefix)/moc -I$(INCLUDES) -D$(DEFINES) -f $(>) -o $(<)}# When moccing files for include only, we don't need -f, otherwise the generated# code will include the .cpp and we'll get duplicated symbols.#actions moc.inc{    $(.binprefix)/moc -I$(INCLUDES) -D$(DEFINES) $(>) -o $(<)}# Generates source files from resource files.#actions rcc{    $(.binprefix)/rcc $(>) -name $(>:B) -o $(<)}# Generates user-interface source from .ui files.#actions uic-h{    $(.binprefix)/uic $(>) -o $(<)}# Scanner for .qrc files. Look for the CDATA section of the <file> tag. Ignore# the "alias" attribute. See http://doc.trolltech.com/qt/resources.html for# detailed documentation of the Qt Resource System.#class qrc-scanner : common-scanner{    rule pattern ( )    {        return "<file.*>(.*)</file>" ;    }}# Wrapped files are "included".scanner.register qrc-scanner : include ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -