增加 QMake Pro 文件说明.
Signed-off-by: rick.chan <chenyang@autoai.com>
This commit is contained in:
parent
61a9712c20
commit
c231045729
|
@ -0,0 +1,33 @@
|
||||||
|
# QMake Pro 文件说明
|
||||||
|
|
||||||
|
## 1.宏/变量
|
||||||
|
|
||||||
|
* DEFINES:qmake adds the values of this variable as compiler C preprocessor macros (-D option).
|
||||||
|
* DEPENDPATH:Specifies a list of directories for qmake to scan, to resolve dependencies.
|
||||||
|
* HEADERS:Defines the header files for the project.
|
||||||
|
* INCLUDEPATH:Specifies the #include directories which should be searched when compiling the project.
|
||||||
|
* LIBS:Specifies a list of libraries to be linked into the project.
|
||||||
|
* OUT_PWD:Specifies the full path leading to the directory where qmake places the generated Makefile.
|
||||||
|
* PWD:Specifies the full path leading to the directory containing the current file being parsed.
|
||||||
|
* QMAKE_RPATHDIR(Unix only):Specifies a list of library paths that are added to the executable at link time so that the paths will be preferentially searched at runtime.
|
||||||
|
* QT:Specifies the Qt modules that are used by your project.
|
||||||
|
* SOURCES:Specifies the names of all source files in the project.
|
||||||
|
* TARGET:Specifies the name of the target file. Contains the base name of the project file by default.
|
||||||
|
* TEMPLATE:Specifies the name of the template to use when generating the project.
|
||||||
|
|
||||||
|
## 2.条件语句
|
||||||
|
|
||||||
|
### 2.1.区分系统平台
|
||||||
|
|
||||||
|
```pro
|
||||||
|
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../tlb/release/ -ltlb
|
||||||
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../tlb/debug/ -ltlb
|
||||||
|
else:unix: LIBS += -L$$OUT_PWD/../tlb/ -ltlb
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2.2.判断预定义宏
|
||||||
|
|
||||||
|
```pro
|
||||||
|
if(contains(DEFINES, MY_DEFINE)){
|
||||||
|
}
|
||||||
|
```
|
Loading…
Reference in New Issue