mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
0aff221882
and add_deploy_library_Qt 添加App发布库的时候对库发布Qt库的函数。
78 lines
2.2 KiB
Plaintext
78 lines
2.2 KiB
Plaintext
#----------------------------------------------------------------
|
||
#add_library_Qwt.pri
|
||
#这是给用户提供的方便pri
|
||
#这个比较common,允许拷贝到用户工程中更改。
|
||
#----------------------------------------------------------------
|
||
|
||
#######################################################################################
|
||
#初始化设置
|
||
#######################################################################################
|
||
#6.1.3
|
||
LIBRARYVER =
|
||
DEBUG = d
|
||
contains(BUILD, Release) {
|
||
DEBUG=
|
||
}
|
||
|
||
|
||
#######################################################################################
|
||
#定义内部函数
|
||
#######################################################################################
|
||
defineReplace(get_add_header_Qwt){
|
||
path = $$1
|
||
isEmpty(1)|!isEmpty(2) : error("get_add_header_Qwt(path) requires one arguments.")
|
||
|
||
command =
|
||
#basic
|
||
command += $${path}
|
||
|
||
return ($$command)
|
||
}
|
||
|
||
defineTest(add_header_Qwt){
|
||
#包含Qwt头文件的过程
|
||
header_path = $$get_add_header(Qwt)
|
||
INCLUDEPATH += $$get_add_header_Qwt($$header_path)
|
||
export(INCLUDEPATH)
|
||
return (1)
|
||
}
|
||
|
||
defineTest(add_library_Qwt){
|
||
#链接Library
|
||
add_library(Qwt, Qwt$${LIBRARYVER}$${DEBUG})
|
||
return (1)
|
||
}
|
||
|
||
#######################################################################################
|
||
#定义外部函数
|
||
#######################################################################################
|
||
#链接Qwt的WorkFlow
|
||
defineTest(add_link_library_Qwt){
|
||
#链接Library
|
||
add_library_Qwt()
|
||
#添加头文件 (如果头文件目录扩展了,就改这个函数)
|
||
add_header_Qwt()
|
||
#这样包含也很好,简洁明了
|
||
#add_header(Qwt, opencv)
|
||
#add_header(Qwt, opencv2)
|
||
#add_header(Qwt, opencv2/core)
|
||
#...
|
||
|
||
#添加宏定义
|
||
#add_defines(xx)
|
||
return (1)
|
||
}
|
||
|
||
#发布依赖library
|
||
#注意Android也需要这个函数,使用这个函数Android才会发布Library到运行时。上边的只是链接作用。
|
||
defineTest(add_deploy_library_Qwt) {
|
||
add_deploy_library_Qt(Qwt, Qwt$${LIBRARYVER}$${DEBUG})
|
||
return (1)
|
||
}
|
||
|
||
defineTest(add_dependent_library_Qwt) {
|
||
add_link_library_Qwt()
|
||
add_deploy_library_Qwt()
|
||
return (1)
|
||
}
|