mirror of
https://github.com/jaredtao/TaoQuick.git
synced 2025-01-31 21:22:58 +08:00
update prf
This commit is contained in:
parent
03b196e438
commit
eba74cc824
16
mkspecs/features/taoBuildPath.prf
Normal file
16
mkspecs/features/taoBuildPath.prf
Normal file
@ -0,0 +1,16 @@
|
||||
defineReplace(setBuildPath) {
|
||||
buildPath = $$1
|
||||
CONFIG(debug,debug|release){
|
||||
MOC_DIR = $${buildPath}/debug/moc
|
||||
RCC_DIR = $${buildPath}/debug/rcc
|
||||
UI_DIR = $${buildPath}/debug/ui
|
||||
OBJECTS_DIR = $${buildPath}/debug/obj
|
||||
QMLCACHE_DIR = $${buildPath}/debug/qmlcache
|
||||
} else {
|
||||
MOC_DIR = $${buildPath}/release/moc
|
||||
RCC_DIR = $${buildPath}/release/rcc
|
||||
UI_DIR = $${buildPath}/release/ui
|
||||
OBJECTS_DIR = $${buildPath}/release/obj
|
||||
QMLCACHE_DIR = $${buildPath}/release/qmlcache
|
||||
}
|
||||
}
|
12
mkspecs/features/taoBundle.prf
Normal file
12
mkspecs/features/taoBundle.prf
Normal file
@ -0,0 +1,12 @@
|
||||
defineReplace(getBundlePath) {
|
||||
appName = $$1
|
||||
BundlePath =
|
||||
macos{
|
||||
CONFIG(debug, debug|release){
|
||||
CONFIG -=app_bundle
|
||||
} else {
|
||||
BundlePath=$${appName}.app/Contents/MacOS/
|
||||
}
|
||||
}
|
||||
return ($$BundlePath)
|
||||
}
|
38
mkspecs/features/taoVersion.prf
Normal file
38
mkspecs/features/taoVersion.prf
Normal file
@ -0,0 +1,38 @@
|
||||
!exists(TaoVersionDefined) {
|
||||
TaoVersionDefined=1
|
||||
|
||||
TAO_VERSION_TAG = 1.0
|
||||
|
||||
# current commit hash
|
||||
REVISION=$$system("git rev-parse HEAD")
|
||||
REVISION=$$str_member($${REVISION}, 0, $$num_add(10, -1))
|
||||
isEmpty(REVISION) {
|
||||
REVISION = 0000000000
|
||||
}
|
||||
|
||||
# last tag
|
||||
Ver=$$system("git describe --abbrev=0 --tags")
|
||||
isEmpty(Ver) {
|
||||
Ver=0.0.0
|
||||
}
|
||||
VerList =$$split(Ver, .)
|
||||
MAJ = $$take_first(VerList)
|
||||
MIN = $$take_first(VerList)
|
||||
PAT = $$take_first(VerList)
|
||||
equals(TEMPLATE, lib) {
|
||||
CONFIG += skip_target_version_ext
|
||||
VER_MAJ = $${MAJ}
|
||||
VER_MIN = $${MIN}
|
||||
VER_PAT = $${PAT}
|
||||
VERSION = $${Ver}
|
||||
}
|
||||
DEFINES += TaoREVISION=$${REVISION}
|
||||
DEFINES += TaoREVISIONSTR=\"\\\"$${REVISION}\\\"\"
|
||||
DEFINES += TaoVer=\"\\\"$${Ver}\\\"\"
|
||||
DEFINES += TaoMAJ=$${MAJ}
|
||||
DEFINES += TaoMIN=$${MIN}
|
||||
DEFINES += TaoPAT=$${PAT}
|
||||
DEFINES += TaoDATETIME=\"\\\"$${_DATE_}\\\"\"
|
||||
DEFINES += TaoCompilerVendor=\"\\\"$${QT_VERSION} $${QMAKE_PLATFORM} $${QMAKE_COMPILER} $${QMAKE_TARGET.arch}\\\"\"
|
||||
# message($${DEFINES})
|
||||
}
|
@ -8,7 +8,7 @@ msvc {
|
||||
QMAKE_CFLAGS += -source-charset:utf-8
|
||||
QMAKE_CXXFLAGS += -source-charset:utf-8
|
||||
}
|
||||
|
||||
load(taoVersion)
|
||||
include(../TaoPlugin.pri)
|
||||
include(../TaoBundle.pri)
|
||||
|
||||
|
@ -14,9 +14,11 @@ versionAtLeast(QT_VERSION, 5.15.0) {
|
||||
}
|
||||
|
||||
uri = $$TARGET
|
||||
|
||||
include(../TaoVersion.pri)
|
||||
include(../TaoBundle.pri)
|
||||
load(taoVersion)
|
||||
load(taoBundle)
|
||||
load(taoBuildPath)
|
||||
BundlePath = getBundlePath(TaoQuickApp)
|
||||
#include(../TaoBundle.pri)
|
||||
include(TaoQuick.pri)
|
||||
include(TaoQuick/TaoQuickDesigner.pri)
|
||||
|
||||
@ -25,19 +27,20 @@ CONFIG(debug, debug|release){
|
||||
} else {
|
||||
DESTDIR = $${TaoQuick_RUN_TREE}/release/$${BundlePath}$${uri}
|
||||
}
|
||||
CONFIG(debug,debug|release){
|
||||
MOC_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/debug/moc
|
||||
RCC_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/debug/rcc
|
||||
UI_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/debug/ui
|
||||
OBJECTS_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/debug/obj
|
||||
QMLCACHE_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/debug/qmlcache
|
||||
} else {
|
||||
MOC_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/release/moc
|
||||
RCC_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/release/rcc
|
||||
UI_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/release/ui
|
||||
OBJECTS_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/release/obj
|
||||
QMLCACHE_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/release/qmlcache
|
||||
}
|
||||
setBuildPath($${TaoQuick_BUILD_TREE}/$${TARGET})
|
||||
#CONFIG(debug,debug|release){
|
||||
# MOC_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/debug/moc
|
||||
# RCC_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/debug/rcc
|
||||
# UI_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/debug/ui
|
||||
# OBJECTS_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/debug/obj
|
||||
# QMLCACHE_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/debug/qmlcache
|
||||
#} else {
|
||||
# MOC_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/release/moc
|
||||
# RCC_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/release/rcc
|
||||
# UI_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/release/ui
|
||||
# OBJECTS_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/release/obj
|
||||
# QMLCACHE_DIR = $${TaoQuick_BUILD_TREE}/$${TARGET}/release/qmlcache
|
||||
#}
|
||||
|
||||
#copy_qmldir
|
||||
!android {
|
||||
|
@ -27,7 +27,7 @@ msvc {
|
||||
|
||||
|
||||
|
||||
include(../TaoVersion.pri)
|
||||
load(taoVersion)
|
||||
#include(../TaoBundle.pri)
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@ msvc {
|
||||
QMAKE_CFLAGS += -source-charset:utf-8
|
||||
QMAKE_CXXFLAGS += -source-charset:utf-8
|
||||
}
|
||||
|
||||
load(taoVersion)
|
||||
include(../TaoPlugin.pri)
|
||||
include(../TaoBundle.pri)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
isEmpty(TaoVersionInclude) {
|
||||
!exists(TaoVersionInclude) {
|
||||
TaoVersionInclude=1
|
||||
TAO_VERSION_TAG = 1.0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user