@@ -22,7 +22,15 | |||||
22 | #define CHARTCONFIG_H_ |
|
22 | #define CHARTCONFIG_H_ | |
23 |
|
23 | |||
24 | #include "qchartglobal.h" |
|
24 | #include "qchartglobal.h" | |
|
25 | #ifdef Q_CC_MSVC | |||
|
26 | // There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly. | |||
|
27 | // This is the case at least with shadow builds. | |||
|
28 | // http://qt-project.org/wiki/jom | |||
|
29 | const char *buildTime = __DATE__; | |||
|
30 | const char *gitHead = "unknown"; | |||
|
31 | #else | |||
25 | #include "qchartversion_p.h" |
|
32 | #include "qchartversion_p.h" | |
|
33 | #endif | |||
26 |
|
34 | |||
27 |
|
35 | |||
28 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
36 | QTCOMMERCIALCHART_BEGIN_NAMESPACE |
@@ -125,24 +125,36 QMAKE_EXTRA_COMPILERS += install_build_public_headers \ | |||||
125 | install_build_private_headers \ |
|
125 | install_build_private_headers \ | |
126 |
|
126 | |||
127 |
|
127 | |||
128 | chartversion.target = $$PWD/qchartversion_p.h |
|
128 | !win32-msvc*: { | |
129 | unix:{ |
|
129 | ||
130 | chartversion.commands = @echo \ |
|
130 | # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly. | |
131 | "const char *buildTime = \\\"`date +'%y%m%d%H%M'`\\\" \\; \ |
|
131 | # This is the case at least with shadow builds. | |
132 | const char *gitHead = \\\"`git rev-parse HEAD`\\\" \\; " \ |
|
132 | # http://qt-project.org/wiki/jom | |
133 | > \ |
|
133 | ||
134 | $$chartversion.target; |
|
134 | chartversion.target = $$PWD/qchartversion_p.h | |
135 | }else{ |
|
135 | ||
136 | chartversion.commands = @echo \ |
|
136 | unix:{ | |
137 | "const char *buildTime = \"%date%_%time%\" ; \ |
|
137 | chartversion.commands = @echo \ | |
138 | const char *gitHead = \"unknown\" ; " \ |
|
138 | "const char *buildTime = \\\"`date +'%y%m%d%H%M'`\\\" \\; \ | |
139 | > \ |
|
139 | const char *gitHead = \\\"`git rev-parse HEAD`\\\" \\; " \ | |
140 | $$chartversion.target |
|
140 | > \ | |
|
141 | $$chartversion.target; | |||
|
142 | }else{ | |||
|
143 | chartversion.commands = @echo \ | |||
|
144 | "const char *buildTime = \"%date%_%time%\" ; \ | |||
|
145 | const char *gitHead = \"unknown\" ; " \ | |||
|
146 | > \ | |||
|
147 | $$chartversion.target | |||
|
148 | } | |||
|
149 | ||||
|
150 | chartversion.depends = $$HEADERS \ | |||
|
151 | $$SOURCES | |||
|
152 | ||||
|
153 | PRE_TARGETDEPS += $$PWD/qchartversion_p.h | |||
|
154 | QMAKE_CLEAN += $$PWD/qchartversion_p.h | |||
|
155 | QMAKE_EXTRA_TARGETS += chartversion | |||
141 | } |
|
156 | } | |
142 | chartversion.depends = $$HEADERS \ |
|
157 | ||
143 | $$SOURCES |
|
|||
144 | PRE_TARGETDEPS += $$PWD/qchartversion_p.h |
|
|||
145 | QMAKE_EXTRA_TARGETS += chartversion |
|
|||
146 | unix:QMAKE_DISTCLEAN += -r \ |
|
158 | unix:QMAKE_DISTCLEAN += -r \ | |
147 | $$CHART_BUILD_HEADER_DIR \ |
|
159 | $$CHART_BUILD_HEADER_DIR \ | |
148 | $$CHART_BUILD_LIB_DIR |
|
160 | $$CHART_BUILD_LIB_DIR |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now