|
@@
-1,173
+1,167
|
|
1
|
!include( ../common.pri ):error( Couldn't find the common.pri file! )
|
|
1
|
!include( ../common.pri ):error( Couldn't find the common.pri file! )
|
|
2
|
TARGET = QtCommercialChart
|
|
2
|
TARGET = QtCommercialChart
|
|
3
|
DESTDIR = $$CHART_BUILD_LIB_DIR
|
|
3
|
DESTDIR = $$CHART_BUILD_LIB_DIR
|
|
4
|
TEMPLATE = lib
|
|
4
|
TEMPLATE = lib
|
|
5
|
QT += core \
|
|
5
|
QT += core \
|
|
6
|
gui
|
|
6
|
gui
|
|
7
|
win32-msvc*: LIBS += User32.lib
|
|
7
|
win32-msvc*: LIBS += User32.lib
|
|
8
|
CONFIG += debug_and_release
|
|
8
|
CONFIG += debug_and_release
|
|
9
|
CONFIG(debug, debug|release):TARGET = QtCommercialChartd
|
|
9
|
CONFIG(debug, debug|release):TARGET = QtCommercialChartd
|
|
10
|
SOURCES += \
|
|
10
|
SOURCES += \
|
|
11
|
$$PWD/chartdataset.cpp \
|
|
11
|
$$PWD/chartdataset.cpp \
|
|
12
|
$$PWD/chartpresenter.cpp \
|
|
12
|
$$PWD/chartpresenter.cpp \
|
|
13
|
$$PWD/charttheme.cpp \
|
|
13
|
$$PWD/charttheme.cpp \
|
|
14
|
$$PWD/domain.cpp \
|
|
14
|
$$PWD/domain.cpp \
|
|
15
|
$$PWD/qchart.cpp \
|
|
15
|
$$PWD/qchart.cpp \
|
|
16
|
$$PWD/qchartview.cpp \
|
|
16
|
$$PWD/qchartview.cpp \
|
|
17
|
$$PWD/qseries.cpp \
|
|
17
|
$$PWD/qseries.cpp \
|
|
18
|
$$PWD/qlegend.cpp \
|
|
|
|
|
19
|
$$PWD/legendmarker.cpp \
|
|
|
|
|
20
|
$$PWD/chartbackground.cpp \
|
|
18
|
$$PWD/chartbackground.cpp \
|
|
21
|
$$PWD/chart.cpp \
|
|
19
|
$$PWD/chart.cpp \
|
|
22
|
$$PWD/scroller.cpp
|
|
20
|
$$PWD/scroller.cpp
|
|
23
|
PRIVATE_HEADERS += \
|
|
21
|
PRIVATE_HEADERS += \
|
|
24
|
$$PWD/chartdataset_p.h \
|
|
22
|
$$PWD/chartdataset_p.h \
|
|
25
|
$$PWD/chartitem_p.h \
|
|
23
|
$$PWD/chartitem_p.h \
|
|
26
|
$$PWD/chartpresenter_p.h \
|
|
24
|
$$PWD/chartpresenter_p.h \
|
|
27
|
$$PWD/charttheme_p.h \
|
|
25
|
$$PWD/charttheme_p.h \
|
|
28
|
$$PWD/domain_p.h \
|
|
26
|
$$PWD/domain_p.h \
|
|
29
|
$$PWD/legendmarker_p.h \
|
|
|
|
|
30
|
$$PWD/chartbackground_p.h \
|
|
27
|
$$PWD/chartbackground_p.h \
|
|
31
|
$$PWD/chart_p.h \
|
|
28
|
$$PWD/chart_p.h \
|
|
32
|
$$PWD/chartconfig_p.h \
|
|
29
|
$$PWD/chartconfig_p.h \
|
|
33
|
$$PWD/qchart_p.h \
|
|
30
|
$$PWD/qchart_p.h \
|
|
34
|
$$PWD/qchartview_p.h \
|
|
31
|
$$PWD/qchartview_p.h \
|
|
35
|
$$PWD/scroller_p.h \
|
|
32
|
$$PWD/scroller_p.h \
|
|
36
|
$$PWD/qseries_p.h \
|
|
33
|
$$PWD/qseries_p.h
|
|
37
|
$$PWD/qlegend_p.h \
|
|
|
|
|
38
|
$$PWD/legendscroller_p.h
|
|
|
|
|
39
|
PUBLIC_HEADERS += \
|
|
34
|
PUBLIC_HEADERS += \
|
|
40
|
$$PWD/qchart.h \
|
|
35
|
$$PWD/qchart.h \
|
|
41
|
$$PWD/qchartglobal.h \
|
|
36
|
$$PWD/qchartglobal.h \
|
|
42
|
$$PWD/qseries.h \
|
|
37
|
$$PWD/qseries.h \
|
|
43
|
$$PWD/qchartview.h \
|
|
38
|
$$PWD/qchartview.h
|
|
44
|
$$PWD/qlegend.h
|
|
|
|
|
45
|
|
|
39
|
|
|
46
|
include(animations/animations.pri)
|
|
40
|
include(animations/animations.pri)
|
|
47
|
include(axis/axis.pri)
|
|
|
|
|
48
|
include(xychart/xychart.pri)
|
|
|
|
|
49
|
include(linechart/linechart.pri)
|
|
|
|
|
50
|
include(areachart/areachart.pri)
|
|
41
|
include(areachart/areachart.pri)
|
|
|
|
|
42
|
include(axis/axis.pri)
|
|
51
|
include(barchart/barchart.pri)
|
|
43
|
include(barchart/barchart.pri)
|
|
|
|
|
44
|
include(legend/legend.pri)
|
|
|
|
|
45
|
include(linechart/linechart.pri)
|
|
52
|
include(piechart/piechart.pri)
|
|
46
|
include(piechart/piechart.pri)
|
|
53
|
include(scatterseries/scatter.pri)
|
|
47
|
include(scatterseries/scatter.pri)
|
|
54
|
include(splinechart/splinechart.pri)
|
|
48
|
include(splinechart/splinechart.pri)
|
|
55
|
include(themes/themes.pri)
|
|
49
|
include(themes/themes.pri)
|
|
56
|
|
|
50
|
include(xychart/xychart.pri)
|
|
57
|
|
|
51
|
|
|
58
|
HEADERS += $$PUBLIC_HEADERS
|
|
52
|
HEADERS += $$PUBLIC_HEADERS
|
|
59
|
HEADERS += $$PRIVATE_HEADERS
|
|
53
|
HEADERS += $$PRIVATE_HEADERS
|
|
60
|
HEADERS += $$THEMES
|
|
54
|
HEADERS += $$THEMES
|
|
61
|
INCLUDEPATH += ../include .
|
|
55
|
INCLUDEPATH += ../include .
|
|
62
|
|
|
56
|
|
|
63
|
OBJECTS_DIR = $$CHART_BUILD_DIR/lib
|
|
57
|
OBJECTS_DIR = $$CHART_BUILD_DIR/lib
|
|
64
|
MOC_DIR = $$CHART_BUILD_DIR/lib
|
|
58
|
MOC_DIR = $$CHART_BUILD_DIR/lib
|
|
65
|
UI_DIR = $$CHART_BUILD_DIR/lib
|
|
59
|
UI_DIR = $$CHART_BUILD_DIR/lib
|
|
66
|
RCC_DIR = $$CHART_BUILD_DIR/lib
|
|
60
|
RCC_DIR = $$CHART_BUILD_DIR/lib
|
|
67
|
DEFINES += QTCOMMERCIALCHART_LIBRARY
|
|
61
|
DEFINES += QTCOMMERCIALCHART_LIBRARY
|
|
68
|
|
|
62
|
|
|
69
|
#qt public headers
|
|
63
|
#qt public headers
|
|
70
|
#this is very primitive and lame parser , TODO: make perl script insted
|
|
64
|
#this is very primitive and lame parser , TODO: make perl script insted
|
|
71
|
!exists($$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal)
|
|
65
|
!exists($$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal)
|
|
72
|
{
|
|
66
|
{
|
|
73
|
system($$QMAKE_MKDIR $$CHART_BUILD_PUBLIC_HEADER_DIR)
|
|
67
|
system($$QMAKE_MKDIR $$CHART_BUILD_PUBLIC_HEADER_DIR)
|
|
74
|
win32:{
|
|
68
|
win32:{
|
|
75
|
command = "echo $${LITERAL_HASH}include \"qchartglobal.h\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal"
|
|
69
|
command = "echo $${LITERAL_HASH}include \"qchartglobal.h\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal"
|
|
76
|
}else{
|
|
70
|
}else{
|
|
77
|
command = "echo \"$${LITERAL_HASH}include \\\"qchartglobal.h\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal"
|
|
71
|
command = "echo \"$${LITERAL_HASH}include \\\"qchartglobal.h\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal"
|
|
78
|
}
|
|
72
|
}
|
|
79
|
system($$command)
|
|
73
|
system($$command)
|
|
80
|
}
|
|
74
|
}
|
|
81
|
|
|
75
|
|
|
82
|
for(file, PUBLIC_HEADERS) {
|
|
76
|
for(file, PUBLIC_HEADERS) {
|
|
83
|
name = $$split(file,'/')
|
|
77
|
name = $$split(file,'/')
|
|
84
|
name = $$last(name)
|
|
78
|
name = $$last(name)
|
|
85
|
class = "$$cat($$file)"
|
|
79
|
class = "$$cat($$file)"
|
|
86
|
class = $$find(class,class)
|
|
80
|
class = $$find(class,class)
|
|
87
|
!isEmpty(class){
|
|
81
|
!isEmpty(class){
|
|
88
|
class = $$split(class,QTCOMMERCIALCHART_EXPORT)
|
|
82
|
class = $$split(class,QTCOMMERCIALCHART_EXPORT)
|
|
89
|
class = $$member(class,1)
|
|
83
|
class = $$member(class,1)
|
|
90
|
class = $$split(class,' ')
|
|
84
|
class = $$split(class,' ')
|
|
91
|
class = $$replace(class,' ','')
|
|
85
|
class = $$replace(class,' ','')
|
|
92
|
class = $$member(class,0)
|
|
86
|
class = $$member(class,0)
|
|
93
|
win32:{
|
|
87
|
win32:{
|
|
94
|
command = "echo $${LITERAL_HASH}include \"$$name\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class"
|
|
88
|
command = "echo $${LITERAL_HASH}include \"$$name\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class"
|
|
95
|
}else{
|
|
89
|
}else{
|
|
96
|
command = "echo \"$${LITERAL_HASH}include \\\"$$name\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class"
|
|
90
|
command = "echo \"$${LITERAL_HASH}include \\\"$$name\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class"
|
|
97
|
}
|
|
91
|
}
|
|
98
|
PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class
|
|
92
|
PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class
|
|
99
|
system($$command)
|
|
93
|
system($$command)
|
|
100
|
}
|
|
94
|
}
|
|
101
|
}
|
|
95
|
}
|
|
102
|
|
|
96
|
|
|
103
|
public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart
|
|
97
|
public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart
|
|
104
|
public_headers.files = $$PUBLIC_HEADERS $$PUBLIC_QT_HEADERS
|
|
98
|
public_headers.files = $$PUBLIC_HEADERS $$PUBLIC_QT_HEADERS
|
|
105
|
|
|
99
|
|
|
106
|
target.path = $$[QT_INSTALL_LIBS]
|
|
100
|
target.path = $$[QT_INSTALL_LIBS]
|
|
107
|
INSTALLS += target public_headers
|
|
101
|
INSTALLS += target public_headers
|
|
108
|
|
|
102
|
|
|
109
|
install_build_public_headers.name = build_public_headers
|
|
103
|
install_build_public_headers.name = build_public_headers
|
|
110
|
install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h
|
|
104
|
install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h
|
|
111
|
install_build_public_headers.input = PUBLIC_HEADERS
|
|
105
|
install_build_public_headers.input = PUBLIC_HEADERS
|
|
112
|
install_build_public_headers.commands = $$QMAKE_COPY \
|
|
106
|
install_build_public_headers.commands = $$QMAKE_COPY \
|
|
113
|
${QMAKE_FILE_NAME} \
|
|
107
|
${QMAKE_FILE_NAME} \
|
|
114
|
$$CHART_BUILD_PUBLIC_HEADER_DIR
|
|
108
|
$$CHART_BUILD_PUBLIC_HEADER_DIR
|
|
115
|
install_build_public_headers.CONFIG += target_predeps \
|
|
109
|
install_build_public_headers.CONFIG += target_predeps \
|
|
116
|
no_link
|
|
110
|
no_link
|
|
117
|
|
|
111
|
|
|
118
|
install_build_private_headers.name = buld_private_headers
|
|
112
|
install_build_private_headers.name = buld_private_headers
|
|
119
|
install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h
|
|
113
|
install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h
|
|
120
|
install_build_private_headers.input = PRIVATE_HEADERS
|
|
114
|
install_build_private_headers.input = PRIVATE_HEADERS
|
|
121
|
install_build_private_headers.commands = $$QMAKE_COPY \
|
|
115
|
install_build_private_headers.commands = $$QMAKE_COPY \
|
|
122
|
${QMAKE_FILE_NAME} \
|
|
116
|
${QMAKE_FILE_NAME} \
|
|
123
|
$$CHART_BUILD_PRIVATE_HEADER_DIR
|
|
117
|
$$CHART_BUILD_PRIVATE_HEADER_DIR
|
|
124
|
install_build_private_headers.CONFIG += target_predeps \
|
|
118
|
install_build_private_headers.CONFIG += target_predeps \
|
|
125
|
no_link
|
|
119
|
no_link
|
|
126
|
|
|
120
|
|
|
127
|
QMAKE_EXTRA_COMPILERS += install_build_public_headers \
|
|
121
|
QMAKE_EXTRA_COMPILERS += install_build_public_headers \
|
|
128
|
install_build_private_headers \
|
|
122
|
install_build_private_headers \
|
|
129
|
|
|
123
|
|
|
130
|
|
|
124
|
|
|
131
|
!win32-msvc*: {
|
|
125
|
!win32-msvc*: {
|
|
132
|
|
|
126
|
|
|
133
|
# There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly.
|
|
127
|
# There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly.
|
|
134
|
# This is the case at least with shadow builds.
|
|
128
|
# This is the case at least with shadow builds.
|
|
135
|
# http://qt-project.org/wiki/jom
|
|
129
|
# http://qt-project.org/wiki/jom
|
|
136
|
|
|
130
|
|
|
137
|
chartversion.target = $$PWD/qchartversion_p.h
|
|
131
|
chartversion.target = $$PWD/qchartversion_p.h
|
|
138
|
|
|
132
|
|
|
139
|
unix:{
|
|
133
|
unix:{
|
|
140
|
chartversion.commands = @echo \
|
|
134
|
chartversion.commands = @echo \
|
|
141
|
"const char *buildTime = \\\"`date +'%y%m%d%H%M'`\\\" \\; \
|
|
135
|
"const char *buildTime = \\\"`date +'%y%m%d%H%M'`\\\" \\; \
|
|
142
|
const char *gitHead = \\\"`git rev-parse HEAD`\\\" \\; " \
|
|
136
|
const char *gitHead = \\\"`git rev-parse HEAD`\\\" \\; " \
|
|
143
|
> \
|
|
137
|
> \
|
|
144
|
$$chartversion.target;
|
|
138
|
$$chartversion.target;
|
|
145
|
}else{
|
|
139
|
}else{
|
|
146
|
chartversion.commands = @echo \
|
|
140
|
chartversion.commands = @echo \
|
|
147
|
"const char *buildTime = \"%date%_%time%\" ; \
|
|
141
|
"const char *buildTime = \"%date%_%time%\" ; \
|
|
148
|
const char *gitHead = \"unknown\" ; " \
|
|
142
|
const char *gitHead = \"unknown\" ; " \
|
|
149
|
> \
|
|
143
|
> \
|
|
150
|
$$chartversion.target
|
|
144
|
$$chartversion.target
|
|
151
|
}
|
|
145
|
}
|
|
152
|
|
|
146
|
|
|
153
|
chartversion.depends = $$HEADERS \
|
|
147
|
chartversion.depends = $$HEADERS \
|
|
154
|
$$SOURCES
|
|
148
|
$$SOURCES
|
|
155
|
|
|
149
|
|
|
156
|
PRE_TARGETDEPS += $$PWD/qchartversion_p.h
|
|
150
|
PRE_TARGETDEPS += $$PWD/qchartversion_p.h
|
|
157
|
QMAKE_CLEAN += $$PWD/qchartversion_p.h
|
|
151
|
QMAKE_CLEAN += $$PWD/qchartversion_p.h
|
|
158
|
QMAKE_EXTRA_TARGETS += chartversion
|
|
152
|
QMAKE_EXTRA_TARGETS += chartversion
|
|
159
|
}
|
|
153
|
}
|
|
160
|
|
|
154
|
|
|
161
|
unix:QMAKE_DISTCLEAN += -r \
|
|
155
|
unix:QMAKE_DISTCLEAN += -r \
|
|
162
|
$$CHART_BUILD_HEADER_DIR \
|
|
156
|
$$CHART_BUILD_HEADER_DIR \
|
|
163
|
$$CHART_BUILD_LIB_DIR
|
|
157
|
$$CHART_BUILD_LIB_DIR
|
|
164
|
win32:QMAKE_DISTCLEAN += /Q \
|
|
158
|
win32:QMAKE_DISTCLEAN += /Q \
|
|
165
|
$$CHART_BUILD_HEADER_DIR \
|
|
159
|
$$CHART_BUILD_HEADER_DIR \
|
|
166
|
$$CHART_BUILD_LIB_DIR
|
|
160
|
$$CHART_BUILD_LIB_DIR
|
|
167
|
|
|
161
|
|
|
168
|
# treat warnings as errors
|
|
162
|
# treat warnings as errors
|
|
169
|
win32-msvc*: {
|
|
163
|
win32-msvc*: {
|
|
170
|
QMAKE_CXXFLAGS += /WX
|
|
164
|
QMAKE_CXXFLAGS += /WX
|
|
171
|
} else {
|
|
165
|
} else {
|
|
172
|
QMAKE_CXXFLAGS += -Werror
|
|
166
|
QMAKE_CXXFLAGS += -Werror
|
|
173
|
}
|
|
167
|
}
|