增加 QMake Pro 文件说明.

Signed-off-by: rick.chan <chenyang@autoai.com>
This commit is contained in:
rick.chan 2021-01-14 11:10:01 +08:00
parent 61a9712c20
commit c231045729
1 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,33 @@
# QMake Pro 文件说明
## 1.宏/变量
* DEFINESqmake adds the values of this variable as compiler C preprocessor macros (-D option).
* DEPENDPATHSpecifies a list of directories for qmake to scan, to resolve dependencies.
* HEADERSDefines the header files for the project.
* INCLUDEPATHSpecifies the #include directories which should be searched when compiling the project.
* LIBSSpecifies a list of libraries to be linked into the project.
* OUT_PWDSpecifies the full path leading to the directory where qmake places the generated Makefile.
* PWDSpecifies 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.
* QTSpecifies the Qt modules that are used by your project.
* SOURCESSpecifies the names of all source files in the project.
* TARGETSpecifies the name of the target file. Contains the base name of the project file by default.
* TEMPLATESpecifies 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)){
}
```