refactor: give preference to using the git command to get the version when VERSION...
authorzccrs <ccrr1314@live.com>
Mon, 15 Jan 2018 09:05:15 +0000 (17:05 +0800)
committerzccrs <ccrr1314@live.com>
Mon, 15 Jan 2018 09:05:15 +0000 (17:05 +0800)
Change-Id: Ie0a1789608cb7b031d41f46702d6ae807eb980e4

.qmake.conf
src/lib.pri

index c2bf5e3ca8f69ff7244530d623b2ba35c4ed8968..c33dce5d92659210fe8067adfb61122b011a0e70 100644 (file)
@@ -1 +1 @@
-isEmpty(VERSION):VERSION=2.0.6
+isEmpty(DTK_VERSION):DTK_VERSION=2.0.6
index fcd892522b9bd5a9d252b1ea2182025113c46823..69c80d45ea7c327365451e2925b1f9aa03a0121a 100644 (file)
@@ -2,9 +2,9 @@ TEMPLATE = lib
 
 isEmpty(VERSION) {
     VERSION = $$system(git describe --tags --abbrev=0)
+    isEmpty(VERSION):VERSION = $$DTK_VERSION
     isEmpty(VERSION):error(VERSION is empty)
     VERSION = $$replace(VERSION, [^0-9.],)
-    message(Version \"$$VERSION\" from git)
 }
 
 isEmpty(VER_MAJ) {