@@ -1,60 +1,60 | |||||
1 | !include( ../plugins.pri ) { |
|
1 | !include( ../plugins.pri ) { | |
2 | error( "Couldn't find the plugins.pri file!" ) |
|
2 | error( "Couldn't find the plugins.pri file!" ) | |
3 | } |
|
3 | } | |
4 |
|
4 | |||
5 | contains(DEFINES, CHARTS_FOR_QUICK2) { |
|
5 | contains(DEFINES, CHARTS_FOR_QUICK2) { | |
6 | DESTDIR = $$CHART_BUILD_QML2_PLUGIN_DIR |
|
6 | DESTDIR = $$CHART_BUILD_QML2_PLUGIN_DIR | |
7 | } else { |
|
7 | } else { | |
8 | DESTDIR = $$CHART_BUILD_QML_PLUGIN_DIR |
|
8 | DESTDIR = $$CHART_BUILD_QML_PLUGIN_DIR | |
9 | } |
|
9 | } | |
10 |
|
10 | |||
11 | INCLUDEPATH += $$CHART_BUILD_PRIVATE_HEADER_DIR |
|
11 | INCLUDEPATH += $$CHART_BUILD_PRIVATE_HEADER_DIR | |
12 |
|
12 | |||
13 | CONFIG(debug, debug|release) { |
|
13 | CONFIG(debug, debug|release) { | |
14 | mac: TARGET = $$join(TARGET,,,_debug) |
|
14 | mac: TARGET = $$join(TARGET,,,_debug) | |
15 | win32: TARGET = $$join(TARGET,,,d) |
|
15 | win32: TARGET = $$join(TARGET,,,d) | |
16 | } |
|
16 | } | |
17 |
|
17 | |||
18 | SOURCES += \ |
|
18 | SOURCES += \ | |
19 | ../declarative/plugin.cpp \ |
|
19 | ../declarative/plugin.cpp \ | |
20 | ../declarative/declarativechart.cpp \ |
|
20 | ../declarative/declarativechart.cpp \ | |
21 | ../declarative/declarativexypoint.cpp \ |
|
21 | ../declarative/declarativexypoint.cpp \ | |
22 | ../declarative/declarativexyseries.cpp \ |
|
22 | ../declarative/declarativexyseries.cpp \ | |
23 | ../declarative/declarativelineseries.cpp \ |
|
23 | ../declarative/declarativelineseries.cpp \ | |
24 | ../declarative/declarativesplineseries.cpp \ |
|
24 | ../declarative/declarativesplineseries.cpp \ | |
25 | ../declarative/declarativeareaseries.cpp \ |
|
25 | ../declarative/declarativeareaseries.cpp \ | |
26 | ../declarative/declarativescatterseries.cpp \ |
|
26 | ../declarative/declarativescatterseries.cpp \ | |
27 | ../declarative/declarativepieseries.cpp \ |
|
27 | ../declarative/declarativepieseries.cpp \ | |
28 | ../declarative/declarativebarseries.cpp \ |
|
28 | ../declarative/declarativebarseries.cpp \ | |
29 | ../declarative/declarativecategoryaxis.cpp \ |
|
29 | ../declarative/declarativecategoryaxis.cpp \ | |
30 | ../declarative/declarativemargins.cpp \ |
|
30 | ../declarative/declarativemargins.cpp \ | |
31 | ../declarative/declarativeaxes.cpp \ |
|
31 | ../declarative/declarativeaxes.cpp \ | |
32 | ../declarative/declarativepolarchart.cpp \ |
|
32 | ../declarative/declarativepolarchart.cpp \ | |
33 | ../declarative/declarativeboxplotseries.cpp |
|
33 | ../declarative/declarativeboxplotseries.cpp | |
34 |
|
34 | |||
35 | HEADERS += \ |
|
35 | HEADERS += \ | |
36 | ../declarative/declarativechart.h \ |
|
36 | ../declarative/declarativechart.h \ | |
37 | ../declarative/declarativexypoint.h \ |
|
37 | ../declarative/declarativexypoint.h \ | |
38 | ../declarative/declarativexyseries.h \ |
|
38 | ../declarative/declarativexyseries.h \ | |
39 | ../declarative/declarativelineseries.h \ |
|
39 | ../declarative/declarativelineseries.h \ | |
40 | ../declarative/declarativesplineseries.h \ |
|
40 | ../declarative/declarativesplineseries.h \ | |
41 | ../declarative/declarativeareaseries.h \ |
|
41 | ../declarative/declarativeareaseries.h \ | |
42 | ../declarative/declarativescatterseries.h \ |
|
42 | ../declarative/declarativescatterseries.h \ | |
43 | ../declarative/declarativepieseries.h \ |
|
43 | ../declarative/declarativepieseries.h \ | |
44 | ../declarative/declarativebarseries.h \ |
|
44 | ../declarative/declarativebarseries.h \ | |
45 | ../declarative/declarativecategoryaxis.h \ |
|
45 | ../declarative/declarativecategoryaxis.h \ | |
46 | ../declarative/declarativemargins.h \ |
|
46 | ../declarative/declarativemargins.h \ | |
47 | ../declarative/declarativeaxes.h \ |
|
47 | ../declarative/declarativeaxes.h \ | |
48 | ../declarative/declarativepolarchart.h \ |
|
48 | ../declarative/declarativepolarchart.h \ | |
49 | ../declarative/shared_defines.h \ |
|
49 | ../declarative/shared_defines.h \ | |
50 | ../declarative/declarativeboxplotseries.h |
|
50 | ../declarative/declarativeboxplotseries.h | |
51 |
|
51 | |||
52 | TARGETPATH = QtCommercial/Chart |
|
52 | TARGETPATH = QtCommercial/Chart | |
53 | target.path = $$IMPORT_INSTALL_PATH/$$TARGETPATH |
|
53 | target.path = $$IMPORT_INSTALL_PATH/$$TARGETPATH | |
54 | qmldir.files += $$_PRO_FILE_PWD_/qmldir |
|
54 | qmldir.files += $$_PRO_FILE_PWD_/qmldir | |
55 | qmldir.path += $$IMPORT_INSTALL_PATH/$$TARGETPATH |
|
55 | qmldir.path += $$IMPORT_INSTALL_PATH/$$TARGETPATH | |
56 | INSTALLS += target qmldir |
|
56 | INSTALLS += target qmldir | |
57 |
|
57 | |||
58 | QMLDIR_FILE = $$_PRO_FILE_PWD_/qmldir |
|
58 | QMLDIR_FILE = $$_PRO_FILE_PWD_/qmldir | |
59 |
|
|
59 | contains(QMAKE_HOST.os, Windows): QMLDIR_FILE = $$replace(QMLDIR_FILE, "/","\\") | |
60 | QMAKE_POST_LINK += $$QMAKE_COPY $$QMLDIR_FILE $$DESTDIR |
|
60 | QMAKE_POST_LINK += $$QMAKE_COPY $$QMLDIR_FILE $$DESTDIR |
@@ -1,266 +1,266 | |||||
1 | !include( ../config.pri ):error( "Couldn't find the config.pri file!" ) |
|
1 | !include( ../config.pri ):error( "Couldn't find the config.pri file!" ) | |
2 |
|
2 | |||
3 | ############################# BUILD CONFIG ###################################### |
|
3 | ############################# BUILD CONFIG ###################################### | |
4 |
|
4 | |||
5 | TARGET = $$LIBRARY_NAME |
|
5 | TARGET = $$LIBRARY_NAME | |
6 | DESTDIR = $$CHART_BUILD_LIB_DIR |
|
6 | DESTDIR = $$CHART_BUILD_LIB_DIR | |
7 | TEMPLATE = lib |
|
7 | TEMPLATE = lib | |
8 | QT = core gui |
|
8 | QT = core gui | |
9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets |
|
9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets | |
10 | DEFINES += QTCOMMERCIALCHART_LIBRARY |
|
10 | DEFINES += QTCOMMERCIALCHART_LIBRARY | |
11 | win32:CONFIG += create_prl |
|
11 | win32:CONFIG += create_prl | |
12 | # treat warnings as errors |
|
12 | # treat warnings as errors | |
13 | win32-msvc*: { |
|
13 | win32-msvc*: { | |
14 | QMAKE_CXXFLAGS += /WX |
|
14 | QMAKE_CXXFLAGS += /WX | |
15 | } else { |
|
15 | } else { | |
16 | # QMAKE_CXXFLAGS += -Werror |
|
16 | # QMAKE_CXXFLAGS += -Werror | |
17 | } |
|
17 | } | |
18 |
|
18 | |||
19 | unix:!qnx { |
|
19 | unix:!qnx:!android { | |
20 | QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden |
|
20 | QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden | |
21 | } |
|
21 | } | |
22 |
|
22 | |||
23 | ############################# DEPEDENCES ######################################## |
|
23 | ############################# DEPEDENCES ######################################## | |
24 |
|
24 | |||
25 | win32-msvc*: LIBS += User32.lib |
|
25 | win32-msvc*: LIBS += User32.lib | |
26 | LIBS -= -l$$LIBRARY_NAME |
|
26 | LIBS -= -l$$LIBRARY_NAME | |
27 | INCLUDEPATH += ../include . |
|
27 | INCLUDEPATH += ../include . | |
28 |
|
28 | |||
29 | ############################# SOURCES ########################################## |
|
29 | ############################# SOURCES ########################################## | |
30 |
|
30 | |||
31 | SOURCES += \ |
|
31 | SOURCES += \ | |
32 | $$PWD/chartdataset.cpp \ |
|
32 | $$PWD/chartdataset.cpp \ | |
33 | $$PWD/chartpresenter.cpp \ |
|
33 | $$PWD/chartpresenter.cpp \ | |
34 | $$PWD/chartthememanager.cpp \ |
|
34 | $$PWD/chartthememanager.cpp \ | |
35 | $$PWD/qchart.cpp \ |
|
35 | $$PWD/qchart.cpp \ | |
36 | $$PWD/qchartview.cpp \ |
|
36 | $$PWD/qchartview.cpp \ | |
37 | $$PWD/qabstractseries.cpp \ |
|
37 | $$PWD/qabstractseries.cpp \ | |
38 | $$PWD/chartbackground.cpp \ |
|
38 | $$PWD/chartbackground.cpp \ | |
39 | $$PWD/chartelement.cpp \ |
|
39 | $$PWD/chartelement.cpp \ | |
40 | $$PWD/chartitem.cpp \ |
|
40 | $$PWD/chartitem.cpp \ | |
41 | $$PWD/scroller.cpp \ |
|
41 | $$PWD/scroller.cpp \ | |
42 | $$PWD/charttitle.cpp \ |
|
42 | $$PWD/charttitle.cpp \ | |
43 | $$PWD/qpolarchart.cpp |
|
43 | $$PWD/qpolarchart.cpp | |
44 | PRIVATE_HEADERS += \ |
|
44 | PRIVATE_HEADERS += \ | |
45 | $$PWD/chartdataset_p.h \ |
|
45 | $$PWD/chartdataset_p.h \ | |
46 | $$PWD/chartitem_p.h \ |
|
46 | $$PWD/chartitem_p.h \ | |
47 | $$PWD/chartpresenter_p.h \ |
|
47 | $$PWD/chartpresenter_p.h \ | |
48 | $$PWD/chartthememanager_p.h \ |
|
48 | $$PWD/chartthememanager_p.h \ | |
49 | $$PWD/chartbackground_p.h \ |
|
49 | $$PWD/chartbackground_p.h \ | |
50 | $$PWD/chartelement_p.h \ |
|
50 | $$PWD/chartelement_p.h \ | |
51 | $$PWD/chartconfig_p.h \ |
|
51 | $$PWD/chartconfig_p.h \ | |
52 | $$PWD/qchart_p.h \ |
|
52 | $$PWD/qchart_p.h \ | |
53 | $$PWD/qchartview_p.h \ |
|
53 | $$PWD/qchartview_p.h \ | |
54 | $$PWD/scroller_p.h \ |
|
54 | $$PWD/scroller_p.h \ | |
55 | $$PWD/qabstractseries_p.h \ |
|
55 | $$PWD/qabstractseries_p.h \ | |
56 | $$PWD/charttitle_p.h \ |
|
56 | $$PWD/charttitle_p.h \ | |
57 | $$PWD/charthelpers_p.h |
|
57 | $$PWD/charthelpers_p.h | |
58 | PUBLIC_HEADERS += \ |
|
58 | PUBLIC_HEADERS += \ | |
59 | $$PWD/qchart.h \ |
|
59 | $$PWD/qchart.h \ | |
60 | $$PWD/qchartglobal.h \ |
|
60 | $$PWD/qchartglobal.h \ | |
61 | $$PWD/qabstractseries.h \ |
|
61 | $$PWD/qabstractseries.h \ | |
62 | $$PWD/qchartview.h \ |
|
62 | $$PWD/qchartview.h \ | |
63 | $$PWD/chartsnamespace.h \ |
|
63 | $$PWD/chartsnamespace.h \ | |
64 | $$PWD/qpolarchart.h |
|
64 | $$PWD/qpolarchart.h | |
65 |
|
65 | |||
66 | include(animations/animations.pri) |
|
66 | include(animations/animations.pri) | |
67 | include(areachart/areachart.pri) |
|
67 | include(areachart/areachart.pri) | |
68 | include(axis/axis.pri) |
|
68 | include(axis/axis.pri) | |
69 | include(domain/domain.pri) |
|
69 | include(domain/domain.pri) | |
70 | include(barchart/barchart.pri) |
|
70 | include(barchart/barchart.pri) | |
71 | include(legend/legend.pri) |
|
71 | include(legend/legend.pri) | |
72 | include(linechart/linechart.pri) |
|
72 | include(linechart/linechart.pri) | |
73 | include(piechart/piechart.pri) |
|
73 | include(piechart/piechart.pri) | |
74 | include(scatterchart/scatter.pri) |
|
74 | include(scatterchart/scatter.pri) | |
75 | include(splinechart/splinechart.pri) |
|
75 | include(splinechart/splinechart.pri) | |
76 | include(themes/themes.pri) |
|
76 | include(themes/themes.pri) | |
77 | include(xychart/xychart.pri) |
|
77 | include(xychart/xychart.pri) | |
78 | include(layout/layout.pri) |
|
78 | include(layout/layout.pri) | |
79 | include(boxplotchart/boxplotchart.pri) |
|
79 | include(boxplotchart/boxplotchart.pri) | |
80 |
|
80 | |||
81 | HEADERS += $$PUBLIC_HEADERS |
|
81 | HEADERS += $$PUBLIC_HEADERS | |
82 | HEADERS += $$PRIVATE_HEADERS |
|
82 | HEADERS += $$PRIVATE_HEADERS | |
83 | HEADERS += $$THEMES |
|
83 | HEADERS += $$THEMES | |
84 |
|
84 | |||
85 | ############################# BUILD PATH ########################################## |
|
85 | ############################# BUILD PATH ########################################## | |
86 |
|
86 | |||
87 | OBJECTS_DIR = $$CHART_BUILD_DIR/lib |
|
87 | OBJECTS_DIR = $$CHART_BUILD_DIR/lib | |
88 | MOC_DIR = $$CHART_BUILD_DIR/lib |
|
88 | MOC_DIR = $$CHART_BUILD_DIR/lib | |
89 | UI_DIR = $$CHART_BUILD_DIR/lib |
|
89 | UI_DIR = $$CHART_BUILD_DIR/lib | |
90 | RCC_DIR = $$CHART_BUILD_DIR/lib |
|
90 | RCC_DIR = $$CHART_BUILD_DIR/lib | |
91 |
|
91 | |||
92 | ############################# PUBLIC HEADERS GENERATOR ########################################## |
|
92 | ############################# PUBLIC HEADERS GENERATOR ########################################## | |
93 |
|
93 | |||
94 | !exists($$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal) |
|
94 | !exists($$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal) | |
95 | { |
|
95 | { | |
96 | system($$QMAKE_MKDIR $$CHART_BUILD_PUBLIC_HEADER_DIR) |
|
96 | system($$QMAKE_MKDIR $$CHART_BUILD_PUBLIC_HEADER_DIR) | |
97 | contains(QMAKE_HOST.os, Windows) { |
|
97 | contains(QMAKE_HOST.os, Windows) { | |
98 | command = "echo $${LITERAL_HASH}include \"qchartglobal.h\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" |
|
98 | command = "echo $${LITERAL_HASH}include \"qchartglobal.h\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" | |
99 | }else{ |
|
99 | }else{ | |
100 | command = "echo \"$${LITERAL_HASH}include \\\"qchartglobal.h\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" |
|
100 | command = "echo \"$${LITERAL_HASH}include \\\"qchartglobal.h\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" | |
101 | } |
|
101 | } | |
102 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal |
|
102 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal | |
103 | system($$command) |
|
103 | system($$command) | |
104 | } |
|
104 | } | |
105 |
|
105 | |||
106 | for(file, PUBLIC_HEADERS) { |
|
106 | for(file, PUBLIC_HEADERS) { | |
107 | name = $$split(file,'/') |
|
107 | name = $$split(file,'/') | |
108 | last_name = $$last(name) |
|
108 | last_name = $$last(name) | |
109 | class = "$$cat($$file)" |
|
109 | class = "$$cat($$file)" | |
110 | found_class = $$find(class,class) |
|
110 | found_class = $$find(class,class) | |
111 | !isEmpty(found_class){ |
|
111 | !isEmpty(found_class){ | |
112 | split_class = $$split(found_class,QTCOMMERCIALCHART_EXPORT) |
|
112 | split_class = $$split(found_class,QTCOMMERCIALCHART_EXPORT) | |
113 | member_class = $$member(split_class,1) |
|
113 | member_class = $$member(split_class,1) | |
114 | member_split_class = $$split(member_class,' ') |
|
114 | member_split_class = $$split(member_class,' ') | |
115 | modified_class = $$replace(member_split_class,' ','') |
|
115 | modified_class = $$replace(member_split_class,' ','') | |
116 | final_class = $$member(modified_class,0) |
|
116 | final_class = $$member(modified_class,0) | |
117 | contains(QMAKE_HOST.os, Windows) { |
|
117 | contains(QMAKE_HOST.os, Windows) { | |
118 | command = "echo $${LITERAL_HASH}include \"$$last_name\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$final_class" |
|
118 | command = "echo $${LITERAL_HASH}include \"$$last_name\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$final_class" | |
119 | }else{ |
|
119 | }else{ | |
120 | command = "echo \"$${LITERAL_HASH}include \\\"$$last_name\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$final_class" |
|
120 | command = "echo \"$${LITERAL_HASH}include \\\"$$last_name\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$final_class" | |
121 | } |
|
121 | } | |
122 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/$$final_class |
|
122 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/$$final_class | |
123 | system($$command) |
|
123 | system($$command) | |
124 | } |
|
124 | } | |
125 | unset(name) |
|
125 | unset(name) | |
126 | unset(last_name) |
|
126 | unset(last_name) | |
127 | unset(class) |
|
127 | unset(class) | |
128 | unset(found_class) |
|
128 | unset(found_class) | |
129 | unset(split_class) |
|
129 | unset(split_class) | |
130 | unset(member_class) |
|
130 | unset(member_class) | |
131 | unset(member_split_class) |
|
131 | unset(member_split_class) | |
132 | unset(modified_class) |
|
132 | unset(modified_class) | |
133 | unset(final_class) |
|
133 | unset(final_class) | |
134 | } |
|
134 | } | |
135 |
|
135 | |||
136 | ############################# INSTALLERS ########################################## |
|
136 | ############################# INSTALLERS ########################################## | |
137 |
|
137 | |||
138 | public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart |
|
138 | public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart | |
139 | public_headers.files = $$PUBLIC_HEADERS $$PUBLIC_QT_HEADERS |
|
139 | public_headers.files = $$PUBLIC_HEADERS $$PUBLIC_QT_HEADERS | |
140 | INSTALLS += public_headers |
|
140 | INSTALLS += public_headers | |
141 |
|
141 | |||
142 | install_build_public_headers.name = build_public_headers |
|
142 | install_build_public_headers.name = build_public_headers | |
143 | install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h |
|
143 | install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h | |
144 | install_build_public_headers.input = PUBLIC_HEADERS |
|
144 | install_build_public_headers.input = PUBLIC_HEADERS | |
145 | install_build_public_headers.commands = $$QMAKE_COPY \ |
|
145 | install_build_public_headers.commands = $$QMAKE_COPY \ | |
146 | ${QMAKE_FILE_NAME} \ |
|
146 | ${QMAKE_FILE_NAME} \ | |
147 | $$CHART_BUILD_PUBLIC_HEADER_DIR |
|
147 | $$CHART_BUILD_PUBLIC_HEADER_DIR | |
148 | install_build_public_headers.CONFIG += target_predeps \ |
|
148 | install_build_public_headers.CONFIG += target_predeps \ | |
149 | no_link |
|
149 | no_link | |
150 |
|
150 | |||
151 | install_build_private_headers.name = build_private_headers |
|
151 | install_build_private_headers.name = build_private_headers | |
152 | install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h |
|
152 | install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h | |
153 | install_build_private_headers.input = PRIVATE_HEADERS |
|
153 | install_build_private_headers.input = PRIVATE_HEADERS | |
154 | install_build_private_headers.commands = $$QMAKE_COPY \ |
|
154 | install_build_private_headers.commands = $$QMAKE_COPY \ | |
155 | ${QMAKE_FILE_NAME} \ |
|
155 | ${QMAKE_FILE_NAME} \ | |
156 | $$CHART_BUILD_PRIVATE_HEADER_DIR |
|
156 | $$CHART_BUILD_PRIVATE_HEADER_DIR | |
157 | install_build_private_headers.CONFIG += target_predeps \ |
|
157 | install_build_private_headers.CONFIG += target_predeps \ | |
158 | no_link |
|
158 | no_link | |
159 |
|
159 | |||
160 | QMAKE_EXTRA_COMPILERS += install_build_public_headers \ |
|
160 | QMAKE_EXTRA_COMPILERS += install_build_public_headers \ | |
161 | install_build_private_headers \ |
|
161 | install_build_private_headers \ | |
162 |
|
162 | |||
163 | win32:{ |
|
163 | win32:{ | |
164 | bintarget.CONFIG += no_check_exist |
|
164 | bintarget.CONFIG += no_check_exist | |
165 | !staticlib: { |
|
165 | !staticlib: { | |
166 | bintarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.dll |
|
166 | bintarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.dll | |
167 | } |
|
167 | } | |
168 | win32-msvc*:CONFIG(debug, debug|release): { |
|
168 | win32-msvc*:CONFIG(debug, debug|release): { | |
169 | bintarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.pdb |
|
169 | bintarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.pdb | |
170 | } |
|
170 | } | |
171 | bintarget.path = $$[QT_INSTALL_BINS] |
|
171 | bintarget.path = $$[QT_INSTALL_BINS] | |
172 |
|
172 | |||
173 | libtarget.CONFIG += no_check_exist |
|
173 | libtarget.CONFIG += no_check_exist | |
174 | libtarget.files = $$CHART_BUILD_LIB_DIR\\$${TARGET}.prl |
|
174 | libtarget.files = $$CHART_BUILD_LIB_DIR\\$${TARGET}.prl | |
175 | win32-msvc*: { |
|
175 | win32-msvc*: { | |
176 | libtarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.lib |
|
176 | libtarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.lib | |
177 | } else { |
|
177 | } else { | |
178 | libtarget.files += $$CHART_BUILD_LIB_DIR\\lib$${TARGET}.a |
|
178 | libtarget.files += $$CHART_BUILD_LIB_DIR\\lib$${TARGET}.a | |
179 | } |
|
179 | } | |
180 | libtarget.path = $$[QT_INSTALL_LIBS] |
|
180 | libtarget.path = $$[QT_INSTALL_LIBS] | |
181 |
|
181 | |||
182 | DLLDESTDIR = $$CHART_BUILD_BIN_DIR |
|
182 | DLLDESTDIR = $$CHART_BUILD_BIN_DIR | |
183 | INSTALLS += bintarget libtarget |
|
183 | INSTALLS += bintarget libtarget | |
184 | }else{ |
|
184 | }else{ | |
185 | target.path=$$[QT_INSTALL_LIBS] |
|
185 | target.path=$$[QT_INSTALL_LIBS] | |
186 | INSTALLS += target |
|
186 | INSTALLS += target | |
187 | } |
|
187 | } | |
188 |
|
188 | |||
189 | mac: !staticlib: { |
|
189 | mac: !staticlib: { | |
190 | # Update the name (id) of the library on OSX to point to the lib path |
|
190 | # Update the name (id) of the library on OSX to point to the lib path | |
191 | MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib" |
|
191 | MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib" | |
192 | QMAKE_POST_LINK += "install_name_tool -id $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME" |
|
192 | QMAKE_POST_LINK += "install_name_tool -id $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME" | |
193 |
|
193 | |||
194 | # Update the name (id) of the installed library on OSX to point to the installation path |
|
194 | # Update the name (id) of the installed library on OSX to point to the installation path | |
195 | postinstall.path = $$[QT_INSTALL_LIBS] |
|
195 | postinstall.path = $$[QT_INSTALL_LIBS] | |
196 | postinstall.extra = "install_name_tool -id $(INSTALL_ROOT)"/"$$[QT_INSTALL_LIBS]"/"$$MAC_CHARTS_LIB_NAME $(INSTALL_ROOT)"/"$$[QT_INSTALL_LIBS]"/"$$MAC_CHARTS_LIB_NAME" |
|
196 | postinstall.extra = "install_name_tool -id $(INSTALL_ROOT)"/"$$[QT_INSTALL_LIBS]"/"$$MAC_CHARTS_LIB_NAME $(INSTALL_ROOT)"/"$$[QT_INSTALL_LIBS]"/"$$MAC_CHARTS_LIB_NAME" | |
197 | INSTALLS += postinstall |
|
197 | INSTALLS += postinstall | |
198 | } |
|
198 | } | |
199 |
|
199 | |||
200 | ################################ DEVELOPMENT BUILD ########################################## |
|
200 | ################################ DEVELOPMENT BUILD ########################################## | |
201 | # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly. |
|
201 | # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly. | |
202 | # This is the case at least with shadow builds. |
|
202 | # This is the case at least with shadow builds. | |
203 | # http://qt-project.org/wiki/jom |
|
203 | # http://qt-project.org/wiki/jom | |
204 |
|
204 | |||
205 | development_build:!win32-msvc*:{ |
|
205 | development_build:!win32-msvc*:{ | |
206 | chartversion.target = $$PWD/qchartversion_p.h |
|
206 | chartversion.target = $$PWD/qchartversion_p.h | |
207 |
|
207 | |||
208 | unix:{ |
|
208 | unix:{ | |
209 | chartversion.commands = @echo \ |
|
209 | chartversion.commands = @echo \ | |
210 | \" $${LITERAL_HASH}ifndef QCHARTVERSION_P_H\\n\ |
|
210 | \" $${LITERAL_HASH}ifndef QCHARTVERSION_P_H\\n\ | |
211 | $${LITERAL_HASH}define QCHARTVERSION_P_H\\n\ |
|
211 | $${LITERAL_HASH}define QCHARTVERSION_P_H\\n\ | |
212 | const char *buildTime = \\\"`date +'%y%m%d%H%M'`\\\" ; \\n\ |
|
212 | const char *buildTime = \\\"`date +'%y%m%d%H%M'`\\\" ; \\n\ | |
213 | const char *gitHead = \\\"`git rev-parse HEAD`\\\" ; \\n \ |
|
213 | const char *gitHead = \\\"`git rev-parse HEAD`\\\" ; \\n \ | |
214 | $${LITERAL_HASH}endif \" \ |
|
214 | $${LITERAL_HASH}endif \" \ | |
215 | > \ |
|
215 | > \ | |
216 | $$chartversion.target; |
|
216 | $$chartversion.target; | |
217 | }else{ |
|
217 | }else{ | |
218 | chartversion.commands = @echo \ |
|
218 | chartversion.commands = @echo \ | |
219 | "const char *buildTime = \"%date%_%time%\" ; \ |
|
219 | "const char *buildTime = \"%date%_%time%\" ; \ | |
220 | const char *gitHead = \"unknown\" ; " \ |
|
220 | const char *gitHead = \"unknown\" ; " \ | |
221 | > \ |
|
221 | > \ | |
222 | $$chartversion.target |
|
222 | $$chartversion.target | |
223 | } |
|
223 | } | |
224 |
|
224 | |||
225 | chartversion.depends = $$HEADERS \ |
|
225 | chartversion.depends = $$HEADERS \ | |
226 | $$SOURCES |
|
226 | $$SOURCES | |
227 |
|
227 | |||
228 | PRE_TARGETDEPS += $$chartversion.target |
|
228 | PRE_TARGETDEPS += $$chartversion.target | |
229 | QMAKE_CLEAN += $$PWD/qchartversion_p.h |
|
229 | QMAKE_CLEAN += $$PWD/qchartversion_p.h | |
230 | QMAKE_EXTRA_TARGETS += chartversion |
|
230 | QMAKE_EXTRA_TARGETS += chartversion | |
231 | } |
|
231 | } | |
232 |
|
232 | |||
233 | ############################### CLEAN ########################################### |
|
233 | ############################### CLEAN ########################################### | |
234 |
|
234 | |||
235 | unix:QMAKE_DISTCLEAN += -r \ |
|
235 | unix:QMAKE_DISTCLEAN += -r \ | |
236 | $$CHART_BUILD_HEADER_DIR \ |
|
236 | $$CHART_BUILD_HEADER_DIR \ | |
237 | $$CHART_BUILD_LIB_DIR |
|
237 | $$CHART_BUILD_LIB_DIR | |
238 | win32:QMAKE_DISTCLEAN += /Q \ |
|
238 | win32:QMAKE_DISTCLEAN += /Q \ | |
239 | $$CHART_BUILD_HEADER_DIR \ |
|
239 | $$CHART_BUILD_HEADER_DIR \ | |
240 | $$CHART_BUILD_LIB_DIR |
|
240 | $$CHART_BUILD_LIB_DIR | |
241 |
|
241 | |||
242 | ############################## COVERAGE ######################################### |
|
242 | ############################## COVERAGE ######################################### | |
243 |
|
243 | |||
244 | unix:coverage:{ |
|
244 | unix:coverage:{ | |
245 |
|
245 | |||
246 | QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage |
|
246 | QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage | |
247 | QMAKE_LDFLAGS += -fprofile-arcs -ftest-coverage |
|
247 | QMAKE_LDFLAGS += -fprofile-arcs -ftest-coverage | |
248 |
|
248 | |||
249 | LIBS += -lgcov |
|
249 | LIBS += -lgcov | |
250 |
|
250 | |||
251 | QMAKE_CLEAN += $$OBJECTS_DIR/*.gcda $$OBJECTS_DIR/*.gcno $$PWD/*.gcov ../coverage/*.info |
|
251 | QMAKE_CLEAN += $$OBJECTS_DIR/*.gcda $$OBJECTS_DIR/*.gcno $$PWD/*.gcov ../coverage/*.info | |
252 | QMAKE_EXTRA_TARGETS += preparecoverage gencoverage |
|
252 | QMAKE_EXTRA_TARGETS += preparecoverage gencoverage | |
253 |
|
253 | |||
254 | preparecoverage.target = prepare_coverage |
|
254 | preparecoverage.target = prepare_coverage | |
255 | preparecoverage.depends = all |
|
255 | preparecoverage.depends = all | |
256 | preparecoverage.commands = lcov --directory $$OBJECTS_DIR --zerocounters ;\ |
|
256 | preparecoverage.commands = lcov --directory $$OBJECTS_DIR --zerocounters ;\ | |
257 | lcov -i -d $$OBJECTS_DIR -c -o ../coverage/base.info -b $$PWD; |
|
257 | lcov -i -d $$OBJECTS_DIR -c -o ../coverage/base.info -b $$PWD; | |
258 |
|
258 | |||
259 | gencoverage.target = gen_coverage |
|
259 | gencoverage.target = gen_coverage | |
260 | gencoverage.depends = all |
|
260 | gencoverage.depends = all | |
261 | gencoverage.commands = lcov -d $$OBJECTS_DIR -c -o ../coverage/src.info -b $$PWD;\ |
|
261 | gencoverage.commands = lcov -d $$OBJECTS_DIR -c -o ../coverage/src.info -b $$PWD;\ | |
262 | lcov -e ../coverage/base.info $$PWD/* $$PWD/animations/* $$PWD/areachart/* $$PWD/axis/* $$PWD/barchart/* $$PWD/legend/* $$PWD/linechart/* $$PWD/piechart/* $$PWD/scatterchart/* $$PWD/splinechart/* $$PWD/themes/* $$PWD/xychart/* -o ../coverage/base.info;\ |
|
262 | lcov -e ../coverage/base.info $$PWD/* $$PWD/animations/* $$PWD/areachart/* $$PWD/axis/* $$PWD/barchart/* $$PWD/legend/* $$PWD/linechart/* $$PWD/piechart/* $$PWD/scatterchart/* $$PWD/splinechart/* $$PWD/themes/* $$PWD/xychart/* -o ../coverage/base.info;\ | |
263 | lcov -e ../coverage/src.info $$PWD/* $$PWD/animations/* $$PWD/areachart/* $$PWD/axis/* $$PWD/barchart/* $$PWD/legend/* $$PWD/linechart/* $$PWD/piechart/* $$PWD/scatterchart/* $$PWD/splinechart/* $$PWD/themes/* $$PWD/xychart/* -o ../coverage/src.info;\ |
|
263 | lcov -e ../coverage/src.info $$PWD/* $$PWD/animations/* $$PWD/areachart/* $$PWD/axis/* $$PWD/barchart/* $$PWD/legend/* $$PWD/linechart/* $$PWD/piechart/* $$PWD/scatterchart/* $$PWD/splinechart/* $$PWD/themes/* $$PWD/xychart/* -o ../coverage/src.info;\ | |
264 | lcov -a ../coverage/base.info -a ../coverage/src.info -o ../coverage/coverage.info; |
|
264 | lcov -a ../coverage/base.info -a ../coverage/src.info -o ../coverage/coverage.info; | |
265 | } |
|
265 | } | |
266 |
|
266 |
General Comments 0
You need to be logged in to leave comments.
Login now