天天看點

Qt configure腳本說明

configure腳本功能非常強大,可以通過它對qt進行配置裁剪,

為了編譯更快一點可以使用下面參數:

-fast 快速配置

-nomake 可以不編譯不需要的檔案夾,根目錄下面的目錄都可以過濾

比如 -nomake examples -nomake demos  -nomake tools 等等

另外就是一些不需要的子產品也可以通過配置腳本來啟用或者禁用,除了一些必須的子產品像gui,corelib等,都是根據配置環境監測的,如果檢測到不能編譯,那麼就自動禁用,否則就啟用。

比如要使用webkit子產品,那麼可以使用參數 -webkit,如果要禁用,那麼則使用-no-webkit, 下面列出可以禁用或者使用的子產品:

  -no-dsp ............ Do not generate VC++ .dsp files.

 *  -dsp ............... Generate VC++ .dsp files, only if spec "win32-msvc".

    -no-vcproj ......... Do not generate VC++ .vcproj files.

 *  -vcproj ............ Generate VC++ .vcproj files, only if platform

                         "win32-msvc.net".

    -no-incredibuild-xge Do not add IncrediBuild XGE distribution commands to

                         custom build steps.

 +  -incredibuild-xge .. Add IncrediBuild XGE distribution commands to custom

                         build steps. This will distribute MOC and UIC steps,

                         and other custom buildsteps which are added to the

                         INCREDIBUILD_XGE variable.

                         (The IncrediBuild distribution commands are only added

                         to Visual Studio projects)

    -no-plugin-manifests Do not embed manifests in plugins.

 *  -plugin-manifests .. Embed manifests in plugins.

    -no-qmake .......... Do not compile qmake.

 *  -qmake ............. Compile qmake.

    -dont-process ...... Do not generate Makefiles/Project files. This will

                         override -no-fast if specified.

 *  -process ........... Generate Makefiles/Project files.

    -no-rtti ........... Do not compile runtime type information.

 *  -rtti .............. Compile runtime type information.

    -no-mmx ............ Do not compile with use of MMX instructions

 +  -mmx ............... Compile with use of MMX instructions

    -no-3dnow .......... Do not compile with use of 3DNOW instructions

 +  -3dnow ............. Compile with use of 3DNOW instructions

    -no-sse ............ Do not compile with use of SSE instructions

 +  -sse ............... Compile with use of SSE instructions

    -no-sse2 ........... Do not compile with use of SSE2 instructions

 +  -sse2 .............. Compile with use of SSE2 instructions

    -no-openssl ........ Do not compile in OpenSSL support

 +  -openssl ........... Compile in run-time OpenSSL support

    -openssl-linked .... Compile in linked OpenSSL support

    -no-dbus ........... Do not compile in D-Bus support

 +  -dbus .............. Compile in D-Bus support and load libdbus-1 dynamicall

                         y

    -dbus-linked ....... Compile in D-Bus support and link to libdbus-1

    -no-phonon ......... Do not compile in the Phonon module

 +  -phonon ............ Compile the Phonon module (Phonon is built if a decent

                         C++ compiler is used.)

    -no-phonon-backend . Do not compile the platform-specific Phonon backend-pl

                         ugin

 *  -phonon-backend .... Compile in the platform-specific Phonon backend-plugin

    -no-multimedia ..... Do not compile the multimedia module

 *  -multimedia ........ Compile in multimedia module

    -no-audio-backend .. Do not compile in the platform audio backend into QtMu

                         ltimedia

 *  -audio-backend ..... Compile in the platform audio backend into QtMultimedi

                         a

    -no-webkit ......... Do not compile in the WebKit module

 +  -webkit ............ Compile in the WebKit module (WebKit is built if a

                         decent C++ compiler is used.)

    -no-script ......... Do not build the QtScript module.

 +  -script ............ Build the QtScript module.

    -no-scripttools .... Do not build the QtScriptTools module.

 +  -scripttools ....... Build the QtScriptTools module.

    -no-declarative .... Do not build the declarative module

 +  -declarative ....... Build the declarative module

    -arch <arch> ....... Specify an architecture.

                         Available values for <arch>:

 *                         windows

                           windowsce

                           symbian

                           boundschecker

                           generic

    -no-style-<style> .. Disable <style> entirely.

    -qt-style-<style> .. Enable <style> in the Qt Library.

                         Available styles:

 +                         windowsxp

 +                         windowsvista

 *                         plastique

 *                         cleanlooks

 *                         motif

 *                         cde

                           windowsmobile

                           s60

    -no-native-gestures Do not use native gestures on Windows 7.

 *  -native-gestures ... Use native gestures on Windows 7.

    -loadconfig <config> Run configure with the parameters from file configure_

                         <config>.cache.

    -saveconfig <config> Run configure and save the parameters in file

                         configure_<config>.cache.

    -redo .............. Run configure with the same parameters as last time.

Qt for Windows CE only:

    -no-iwmmxt ......... Do not compile with use of IWMMXT instructions

 +  -iwmmxt ............ Do compile with use of IWMMXT instructions (Qt for

                         Windows CE on Arm only)

 *  -no-crt ............ Do not add the C runtime to default deployment rules

    -qt-crt ............ Qt identifies C runtime during project generation

    -crt <path> ........ Specify path to C runtime used for project generation.

    -no-cetest ......... Do not compile Windows CE remote test application

 +  -cetest ............ Compile Windows CE remote test application

    -signature <file> .. Use file for signing the target project

    -opengl-es-cm ...... Enable support for OpenGL ES Common

    -opengl-es-cl ...... Enable support for OpenGL ES Common Lite

    -opengl-es-2 ....... Enable support for OpenGL ES 2.0

 *  -phonon-wince-ds9 .. Enable Phonon Direct Show 9 backend for Windows CE

Qt for Symbian OS only:

 *  -no-freetype ....... Do not compile in Freetype2 support.

    -qt-freetype ....... Use the libfreetype bundled with Qt.

    -fpu <flags> ....... VFP type on ARM, supported options: softvfp(default) |

                         vfpv2 | softvfp+vfpv2

    -no-s60 ............ Do not compile in S60 support.

 *  -s60 ............... Compile with support for the S60 UI Framework

    -no-usedeffiles .... Disable the usage of DEF files.

 *  -usedeffiles ....... Enable the usage of DEF files.

如果要配置為嵌入式系統,那麼可以使用參數:

-embedded arm -xplatform qws/linux-arm-g++

還有許多其他配置參數可以參考幫助說明,另外一個重要的裁剪參數就是-qconfig,後續會深入介紹。