2018-05-24 20:03:03 +08:00
|
|
|
|
#---------------------------------------------------------------------------------
|
2018-05-26 09:24:11 +08:00
|
|
|
|
#add_base_manager.pri
|
2018-05-24 20:03:03 +08:00
|
|
|
|
#应用程序和Library的基础管理器,统一使用这个管理器。
|
|
|
|
|
#---------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
#包含这个pri依赖的pri
|
2018-05-26 09:24:11 +08:00
|
|
|
|
#设置目标平台 QSYS
|
2018-05-24 20:03:03 +08:00
|
|
|
|
################################################################################
|
|
|
|
|
include ($${PWD}/add_platform.pri)
|
|
|
|
|
include ($${PWD}/add_function.pri)
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
#多链接技术入口
|
2018-05-26 09:24:11 +08:00
|
|
|
|
#配置重要的三个路径 APP_BUILD_ROOT APP_DEPLOY_ROOT LIB_SDK_ROOT
|
2018-05-24 20:03:03 +08:00
|
|
|
|
################################################################################
|
|
|
|
|
include($${PWD}/add_multi_link_technology.pri)
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
#这里的pri提供multi link的全部函数
|
2018-05-26 09:24:11 +08:00
|
|
|
|
#增加发布
|
|
|
|
|
#增加发布配置
|
|
|
|
|
#增加链接库
|
|
|
|
|
#增加链接库头文件
|
|
|
|
|
#增加SDK (lib用)
|
|
|
|
|
#增加版本信息
|
2018-05-24 20:03:03 +08:00
|
|
|
|
################################################################################
|
|
|
|
|
#app发布所需要的函数
|
|
|
|
|
include ($${PWD}/add_deploy.pri)
|
|
|
|
|
|
|
|
|
|
#app发布配置项需要的函数
|
|
|
|
|
include ($${PWD}/add_deploy_config.pri)
|
|
|
|
|
|
|
|
|
|
#链接lib所需要的函数 包含lib头文件所需要的函数 设置lib宏所需要的函数
|
|
|
|
|
include ($${PWD}/add_library.pri)
|
|
|
|
|
|
|
|
|
|
#lib发布sdk所需要的函数
|
|
|
|
|
include ($${PWD}/add_sdk.pri)
|
|
|
|
|
|
2018-05-26 09:24:11 +08:00
|
|
|
|
#program version
|
|
|
|
|
include ($${PWD}/add_version.pri)
|
|
|
|
|
|
2018-05-26 10:37:34 +08:00
|
|
|
|
#program language
|
|
|
|
|
include ($${PWD}/add_language.pri)
|
|
|
|
|
|
2018-05-24 20:03:03 +08:00
|
|
|
|
####################################################################################
|
2018-05-26 09:24:11 +08:00
|
|
|
|
#base manager 都做了以下这些事情
|
2018-05-24 20:03:03 +08:00
|
|
|
|
####################################################################################
|
2018-05-26 09:24:11 +08:00
|
|
|
|
#公共的基础header.pri
|
|
|
|
|
#包含基本的Qt工程设置 qqt_header.pri里的设置更详细
|
|
|
|
|
include ($${PWD}/add_base_header.pri)
|
2018-05-24 20:03:03 +08:00
|
|
|
|
|
|
|
|
|
#################################################################
|
|
|
|
|
##definition and configration
|
|
|
|
|
##need QSYS
|
|
|
|
|
#################################################################
|
2018-05-27 15:45:02 +08:00
|
|
|
|
contains(TEMPLATE, app) {
|
|
|
|
|
#add base manager对App的处理很少,App通过函数基本上能解决所有的事情
|
|
|
|
|
#macOS下必须开开bundle
|
|
|
|
|
contains(QSYS_PRIVATE, macOS){
|
|
|
|
|
CONFIG += app_bundle
|
|
|
|
|
}
|
|
|
|
|
} else: contains(TEMPLATE, lib) {
|
|
|
|
|
##base manager 对lib的处理很重要
|
|
|
|
|
##区分了在不同目标下Qt library的不同形态,其实就是要求lib工程和Qt library保持一样的状态。
|
|
|
|
|
##尤其在windows平台下,还提供了LIB_STATIC_LIBRARY 和 LIB_LIBRARY两个宏的支持
|
|
|
|
|
##帮助用户区分lib的状态。
|
|
|
|
|
|
|
|
|
|
##win platform: some target, special lib lib_bundle staticlib
|
|
|
|
|
##only deal dynamic is ok, static all in headers dealing.
|
|
|
|
|
##define macro before header.
|
|
|
|
|
#专门为lib工程设置
|
2018-05-26 19:43:44 +08:00
|
|
|
|
contains(QSYS_PRIVATE, Win32|Windows|Win64) {
|
2018-05-26 09:24:11 +08:00
|
|
|
|
#Qt is static by mingw32 building
|
|
|
|
|
mingw {
|
|
|
|
|
#on my computer , Qt library are all static library?
|
|
|
|
|
#create static lib (important, only occured at builder pro)
|
|
|
|
|
CONFIG += staticlib
|
2018-05-27 15:45:02 +08:00
|
|
|
|
#在add_base_header里设置
|
2018-05-26 19:43:44 +08:00
|
|
|
|
#DEFINES += LIB_STATIC_LIBRARY
|
2018-05-26 09:24:11 +08:00
|
|
|
|
} else {
|
|
|
|
|
#create dynamic lib (important, only occured at builder pro)
|
|
|
|
|
CONFIG += dll
|
|
|
|
|
#no other one deal this, define it here, right here.
|
|
|
|
|
DEFINES += LIB_LIBRARY
|
|
|
|
|
}
|
|
|
|
|
#*nux platform: no macro
|
|
|
|
|
} else {
|
2018-05-27 15:45:02 +08:00
|
|
|
|
contains(QSYS_PRIVATE, macOS) {
|
2018-05-26 09:24:11 +08:00
|
|
|
|
CONFIG += dll
|
2018-05-27 15:45:02 +08:00
|
|
|
|
#macOS下必须开开bundle
|
2018-05-26 09:24:11 +08:00
|
|
|
|
CONFIG += lib_bundle
|
|
|
|
|
} else:contains(QSYS_PRIVATE, iOS|iOSSimulator) {
|
|
|
|
|
CONFIG += static
|
|
|
|
|
} else {
|
|
|
|
|
##default build dll
|
|
|
|
|
CONFIG += dll
|
|
|
|
|
#*nix no need this macro
|
|
|
|
|
#DEFINES += LIB_LIBRARY
|
|
|
|
|
}
|
2018-05-24 20:03:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2018-05-26 09:24:11 +08:00
|
|
|
|
#CONFIG += build_pass
|
|
|
|
|
build_pass:CONFIG(debug, debug|release) {
|
|
|
|
|
#troublesome
|
|
|
|
|
#win32: TARGET = $$join(TARGET,,,d)
|
2018-05-24 20:03:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2018-05-27 15:45:02 +08:00
|
|
|
|
#lib 必须创建prl
|
2018-05-26 09:24:11 +08:00
|
|
|
|
#create sdk need
|
|
|
|
|
CONFIG += create_prl
|
|
|
|
|
}
|
|
|
|
|
|
2018-05-24 20:03:03 +08:00
|
|
|
|
#################################################################
|
2018-05-26 14:49:18 +08:00
|
|
|
|
##此处代码完成包含(链接)libQQt
|
2018-05-27 02:54:15 +08:00
|
|
|
|
##这里是对QQt的lib的链接支持。
|
2018-05-26 09:24:11 +08:00
|
|
|
|
#################################################################
|
|
|
|
|
!equals(TARGET, QQt) {
|
2018-05-27 02:54:15 +08:00
|
|
|
|
include ($${PWD}/add_library_QQt.pri)
|
2018-05-24 20:03:03 +08:00
|
|
|
|
}
|