From c23104572947264167654cf2a82d857a9b0e717f Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Thu, 14 Jan 2021 11:10:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20QMake=20Pro=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=AF=B4=E6=98=8E.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rick.chan --- .../Qt/QMake/QMake_Pro_文件说明.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Software/Development/Environment/Qt/QMake/QMake_Pro_文件说明.md diff --git a/Software/Development/Environment/Qt/QMake/QMake_Pro_文件说明.md b/Software/Development/Environment/Qt/QMake/QMake_Pro_文件说明.md new file mode 100644 index 0000000..3666816 --- /dev/null +++ b/Software/Development/Environment/Qt/QMake/QMake_Pro_文件说明.md @@ -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)){ +} +```