针对symbian系统的QT应用程序使用标准的.pro文件。同时,.pro文件中又添加了一些专门针对Symbian系统的选项。这些选项可以添加在专门的Symbian模块中,从而qmake在编译Symbian系统程序时才会使用这些选项。防止编译针对其他系统的程序造成错误。
TEMPLATE 指出编译所得二进制文件的公式,APP还是DLL文件
TARGET 目标文件的名称,扩展名有TEMPLATE决定。
TARGET.UIDs (i.e. UID1, UID2, UID3, SID, and VID) 塞班程序执行所需的UID,分类好多,还没搞清楚。
TARGET.EPOCSTACKSIZE
TARGET.EPOCHEAPSIZE
主线程堆和栈的大小(可选)
LIB
程序编译所需的额外的库文件。
QT
工程中的QT库文件。
INCLUDEPATH
工程对应的头文件的路径。
TARGET.CAPABILITY
对改选项对应的模块授予相应的权限,使其可以访问相应的系统数据。
TARGET.EPOCALLOWDLLDATA
Enable/disable writeable static data
DEFINES
Preprocessor macro definitions
DEPLOYMENT
For adding extra files and dependencies to the installation package file
QMAKE_CXXFLAGS
Additional compiler options
SUBDIRS
Defines sub-projects that will be built separately
MMP_RULES
For adding further statements to the Symbian project file lines
BLD_INF_RULES
Defines generic rules for the generated Symbian bld.inf file
RSS_RULES
For modifying the content of the application registration files
ICON
Sets the application icon for a Symbian application.
This should be separated from other graphics definitions by putting it in 'symbian' scope. This is because the format of the icon might cause problems if the project is compiled for other platforms.
塞班中的QtMobility模块是独立于QT的一个模块,如果想在代码中使用QtMobility,则需要在.pro文件中添加如下代码:
CONFIG+=QtMobility
若想使用QtMobility中的某一个功能,则需添加如下代码:
Mobility= location
该句对location功能进行了使能。
CONFIG参数的作用如下:
添加或减少CONFIG的配置模块,一般采用默认即可,但是除去debug_and_release模块不会生成debug和release文件夹
#CONFIG += release
CONFIG -= debug_and_release