mirror of https://github.com/linuxdeepin/dtkcore
chore: 修改ignore文件和删除无用prf文件
忽略生成的cmake文件,删除未使用的prf文件(统一使用dtkcommon中的) Log: Change-Id: I146360b189972bc6c85432c6304ed98506fe4c72 (cherry picked from commit e5ebd6c16571c4e5236dcb8a61ce3b023db047cb)
This commit is contained in:
parent
91c51d6daa
commit
170f535ead
|
@ -27,3 +27,5 @@ src/qt_lib_d*.pri
|
|||
bin/
|
||||
.qmake*
|
||||
Makefile
|
||||
|
||||
cmake/DtkCore*
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
isEmpty(DTK_MODULE_NAME): error(set DTK_MODULE_NAME first)
|
||||
!contains(DTK_MODULE_NAME, ^dtk[a-z0-9]+$): error(The format of the value of DTK_MODULE_NAME is incorrect. eg: dtk[a-z0-9]+)
|
||||
!isEqual(DTK_MODULE_NAME, dtkcore):!contains(QT, dtkcore): error(QT += dtkcore first)
|
||||
|
||||
#将首字母改为大写
|
||||
defineReplace(capitalizingString) {
|
||||
RAW=$$1
|
||||
FIRST = $$upper($$section(RAW, "", 1, 1))
|
||||
OTHERS = $$section(RAW, "", 2, -1)
|
||||
return($$FIRST$$OTHERS)
|
||||
}
|
||||
|
||||
defineTest(checkDtkVersion) {
|
||||
isEmpty(VERSION) {
|
||||
!isEqual(DTK_MODULE_NAME, dtkcore) {
|
||||
VERSION = $${QT.dtkcore.VERSION}
|
||||
}
|
||||
|
||||
# TODO: failed in windows
|
||||
isEmpty(VERSION): VERSION = $$system(git describe --tags --abbrev=0)
|
||||
isEmpty(VERSION): VERSION = $$DTK_VERSION
|
||||
isEmpty(VERSION): return(false)
|
||||
VERSION = $$replace(VERSION, [^0-9.],)
|
||||
}
|
||||
|
||||
export(VERSION)
|
||||
return(true)
|
||||
}
|
||||
|
||||
!checkDtkVersion():error("check dtk version failed")
|
||||
|
||||
message("build dtk with version $$VERSION")
|
||||
ver_list = $$split(VERSION, .)
|
||||
|
||||
isEmpty(VER_MAJ) {
|
||||
VER_MAJ = $$format_number($$first(ver_list), ibase=10)
|
||||
}
|
||||
isEmpty(VER_MIN) {
|
||||
VER_MIN = $$format_number($$member(ver_list, 1, 1), ibase=10)
|
||||
isEmpty(VER_MIN):VER_MIN = 0
|
||||
}
|
||||
isEmpty(VER_PAT) {
|
||||
VER_PAT = $$format_number($$member(ver_list, 2, 2), ibase=10)
|
||||
isEmpty(VER_PAT):VER_PAT = 0
|
||||
}
|
||||
isEmpty(VER_BUI) {
|
||||
VER_BUI = $$member(ver_list, 3, 3)
|
||||
# fix VER_BUI=009, invalid digit "9" in octal constant error
|
||||
VER_BUI = $$format_number($$VER_BUI, ibase=10)
|
||||
isEmpty(VER_BUI):VER_BUI = 0
|
||||
}
|
||||
|
||||
isEmpty(PREFIX){
|
||||
PREFIX = /usr
|
||||
}
|
||||
|
||||
isEmpty(LIB_INSTALL_DIR) {
|
||||
isEqual(DTK_MODULE_NAME, dtkcore) {
|
||||
LIB_INSTALL_DIR=$$PREFIX/lib
|
||||
} else {
|
||||
LIB_INSTALL_DIR=$${QT.dtkcore.libs}
|
||||
}
|
||||
}
|
||||
|
||||
LIB_VERSION_NAME = libdtk-$${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
|
||||
MODULE_NAME = $$upper($$member($$list($$split(DTK_MODULE_NAME,)), 3, 3))$$join($$list($$member($$list($$split(DTK_MODULE_NAME,)), 4, -1)))
|
||||
DMODULE_NAME = D$${MODULE_NAME}
|
||||
|
||||
isEmpty(TOOL_INSTALL_DIR) {
|
||||
TOOL_INSTALL_DIR=$$LIB_INSTALL_DIR/$$LIB_VERSION_NAME/$$DMODULE_NAME/bin
|
||||
}
|
||||
|
||||
isEmpty(INCLUDE_INSTALL_DIR) {
|
||||
isEqual(DTK_MODULE_NAME, dtkcore) {
|
||||
INCLUDE_INSTALL_DIR = $$PREFIX/include/$$LIB_VERSION_NAME/$$DMODULE_NAME
|
||||
} else {
|
||||
INCLUDE_INSTALL_DIR = $${QT.dtkcore.includes}/../$$DMODULE_NAME
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue