@@ -1,95 +1,93 | |||||
1 |
|
1 | |||
2 | LIBRARY_NAME = QtCommercialChart |
|
2 | LIBRARY_NAME = QtCommercialChart | |
3 | coverage: CONFIG+=debug |
|
3 | coverage: CONFIG+=debug | |
4 |
|
4 | |||
5 | ##################### SHADOW CONFIG ################################################# |
|
5 | ##################### SHADOW CONFIG ################################################# | |
6 |
|
6 | |||
7 | !contains($${PWD}, $${OUT_PWD}){ |
|
7 | !contains($${PWD}, $${OUT_PWD}){ | |
8 | search = "$$PWD:::" |
|
8 | search = "$$PWD:::" | |
9 | temp = $$split(search,"/") |
|
9 | temp = $$split(search,"/") | |
10 | temp = $$last(temp) |
|
10 | temp = $$last(temp) | |
11 | path = $$replace(search,$$temp,'') |
|
11 | path = $$replace(search,$$temp,'') | |
12 | temp = $$split(OUT_PWD,$$path) |
|
12 | temp = $$split(OUT_PWD,$$path) | |
13 | temp = $$split(temp,'/') |
|
13 | temp = $$split(temp,'/') | |
14 | temp = $$first(temp) |
|
14 | temp = $$first(temp) | |
15 | path = "$${path}$${temp}" |
|
15 | path = "$${path}$${temp}" | |
16 | SHADOW=$$path |
|
16 | SHADOW=$$path | |
17 | }else{ |
|
17 | }else{ | |
18 | SHADOW=$$PWD |
|
18 | SHADOW=$$PWD | |
19 | CONFIG-=development_build |
|
19 | CONFIG-=development_build | |
20 | } |
|
20 | } | |
21 |
|
21 | |||
22 | ##################### BUILD PATHS ################################################## |
|
22 | ##################### BUILD PATHS ################################################## | |
23 |
|
23 | |||
24 | CHART_BUILD_PUBLIC_HEADER_DIR = $$SHADOW/include |
|
24 | CHART_BUILD_PUBLIC_HEADER_DIR = $$SHADOW/include | |
25 | CHART_BUILD_PRIVATE_HEADER_DIR = $$CHART_BUILD_PUBLIC_HEADER_DIR/private |
|
25 | CHART_BUILD_PRIVATE_HEADER_DIR = $$CHART_BUILD_PUBLIC_HEADER_DIR/private | |
26 | CHART_BUILD_LIB_DIR = $$SHADOW/lib |
|
26 | CHART_BUILD_LIB_DIR = $$SHADOW/lib | |
27 | CHART_BUILD_DIR = $$SHADOW/build |
|
27 | CHART_BUILD_DIR = $$SHADOW/build | |
28 | CHART_BUILD_BIN_DIR = $$SHADOW/bin |
|
28 | CHART_BUILD_BIN_DIR = $$SHADOW/bin | |
29 | CHART_BUILD_PLUGIN_DIR = $$CHART_BUILD_BIN_DIR/QtCommercial/Chart |
|
29 | CHART_BUILD_PLUGIN_DIR = $$CHART_BUILD_BIN_DIR/QtCommercial/Chart | |
30 | CHART_BUILD_DOC_DIR = $$SHADOW/doc |
|
30 | CHART_BUILD_DOC_DIR = $$SHADOW/doc | |
31 |
|
31 | |||
32 | win32:{ |
|
32 | win32:{ | |
33 | CHART_BUILD_PUBLIC_HEADER_DIR = $$replace(CHART_BUILD_PUBLIC_HEADER_DIR, "/","\\") |
|
33 | CHART_BUILD_PUBLIC_HEADER_DIR = $$replace(CHART_BUILD_PUBLIC_HEADER_DIR, "/","\\") | |
34 | CHART_BUILD_PRIVATE_HEADER_DIR = $$replace(CHART_BUILD_PRIVATE_HEADER_DIR, "/","\\") |
|
34 | CHART_BUILD_PRIVATE_HEADER_DIR = $$replace(CHART_BUILD_PRIVATE_HEADER_DIR, "/","\\") | |
35 | CHART_BUILD_BUILD_DIR = $$replace(CHART_BUILD_BUILD_DIR, "/","\\") |
|
35 | CHART_BUILD_BUILD_DIR = $$replace(CHART_BUILD_BUILD_DIR, "/","\\") | |
36 | CHART_BUILD_BIN_DIR = $$replace(CHART_BUILD_BIN_DIR, "/","\\") |
|
36 | CHART_BUILD_BIN_DIR = $$replace(CHART_BUILD_BIN_DIR, "/","\\") | |
37 | CHART_BUILD_PLUGIN_DIR = $$replace(CHART_BUILD_PLUGIN_DIR, "/","\\") |
|
37 | CHART_BUILD_PLUGIN_DIR = $$replace(CHART_BUILD_PLUGIN_DIR, "/","\\") | |
38 | CHART_BUILD_DOC_DIR = $$replace(CHART_BUILD_DOC_DIR, "/","\\") |
|
38 | CHART_BUILD_DOC_DIR = $$replace(CHART_BUILD_DOC_DIR, "/","\\") | |
39 | CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_DIR, "/","\\") |
|
39 | CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_DIR, "/","\\") | |
40 | } |
|
40 | } | |
41 |
|
41 | |||
42 | mac: { |
|
42 | mac: { | |
43 | # TODO: The following qmake flags are a work-around to make QtCommercial Charts compile on |
|
43 | # TODO: The following qmake flags are a work-around to make QtCommercial Charts compile on | |
44 | # QtCommercial 4.8. On the other hand Charts builds successfully with Qt open source 4.8 |
|
44 | # QtCommercial 4.8. On the other hand Charts builds successfully with Qt open source 4.8 | |
45 | # without these definitions, so this is probably a configuration issue on QtCommercial 4.8; |
|
45 | # without these definitions, so this is probably a configuration issue on QtCommercial 4.8; | |
46 | # it should probably define the minimum OSX version to be 10.5... |
|
46 | # it should probably define the minimum OSX version to be 10.5... | |
47 | QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5 |
|
47 | QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5 | |
48 | QMAKE_LFLAGS *= -mmacosx-version-min=10.5 |
|
48 | QMAKE_LFLAGS *= -mmacosx-version-min=10.5 | |
49 |
|
||||
50 | CHART_BUILD_LIB_DIR = $$CHART_BUILD_BIN_DIR |
|
|||
51 | } |
|
49 | } | |
52 |
|
50 | |||
53 | ##################### DEVELOPMENT BUILD ################################################### |
|
51 | ##################### DEVELOPMENT BUILD ################################################### | |
54 |
|
52 | |||
55 | development_build: { |
|
53 | development_build: { | |
56 | DEFINES+=DEVELOPMENT_BUILD |
|
54 | DEFINES+=DEVELOPMENT_BUILD | |
57 | CONFIG+=debug_and_release |
|
55 | CONFIG+=debug_and_release | |
58 | } |
|
56 | } | |
59 |
|
57 | |||
60 |
|
58 | |||
61 | ##################### BUILD CONFIG ######################################################## |
|
59 | ##################### BUILD CONFIG ######################################################## | |
62 |
|
60 | |||
63 | !system_build:{ |
|
61 | !system_build:{ | |
64 |
|
62 | |||
65 | INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR |
|
63 | INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR | |
66 |
|
64 | |||
67 | !win32: { |
|
65 | !win32: { | |
68 | LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR |
|
66 | LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR | |
69 | }else{ |
|
67 | }else{ | |
70 | win32-msvc*: { |
|
68 | win32-msvc*: { | |
71 | # hack fix for error: |
|
69 | # hack fix for error: | |
72 | # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" |
|
70 | # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'" | |
73 | QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR |
|
71 | QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR | |
74 | }else{ |
|
72 | }else{ | |
75 | LIBS += -L $$CHART_BUILD_LIB_DIR |
|
73 | LIBS += -L $$CHART_BUILD_LIB_DIR | |
76 | } |
|
74 | } | |
77 | } |
|
75 | } | |
78 |
|
76 | |||
79 | CONFIG(debug, debug|release) { |
|
77 | CONFIG(debug, debug|release) { | |
80 | mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug) |
|
78 | mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug) | |
81 | win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d) |
|
79 | win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d) | |
82 | } |
|
80 | } | |
83 |
|
81 | |||
84 | LIBS += -l$$LIBRARY_NAME |
|
82 | LIBS += -l$$LIBRARY_NAME | |
85 | } else { |
|
83 | } else { | |
86 | CONFIG += qtcommercialchart |
|
84 | CONFIG += qtcommercialchart | |
87 | } |
|
85 | } | |
88 |
|
86 | |||
89 | ##################### UNIT TESTS ############################################################## |
|
87 | ##################### UNIT TESTS ############################################################## | |
90 |
|
88 | |||
91 | CONFIG(debug, debug|release) { |
|
89 | CONFIG(debug, debug|release) { | |
92 | CONFIG+=test_private |
|
90 | CONFIG+=test_private | |
93 | DEFINES+=BUILD_PRIVATE_UNIT_TESTS |
|
91 | DEFINES+=BUILD_PRIVATE_UNIT_TESTS | |
94 | } |
|
92 | } | |
95 |
|
93 |
@@ -1,242 +1,247 | |||||
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 | DEFINES += QTCOMMERCIALCHART_LIBRARY |
|
9 | DEFINES += QTCOMMERCIALCHART_LIBRARY | |
10 | win32:CONFIG += create_prl |
|
10 | win32:CONFIG += create_prl | |
11 | # treat warnings as errors |
|
11 | # treat warnings as errors | |
12 | win32-msvc*: { |
|
12 | win32-msvc*: { | |
13 | QMAKE_CXXFLAGS += /WX |
|
13 | QMAKE_CXXFLAGS += /WX | |
14 | } else { |
|
14 | } else { | |
15 | QMAKE_CXXFLAGS += -Werror |
|
15 | QMAKE_CXXFLAGS += -Werror | |
16 | } |
|
16 | } | |
17 |
|
17 | |||
18 | unix:{ |
|
18 | unix:{ | |
19 | QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden |
|
19 | QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden | |
20 | } |
|
20 | } | |
21 |
|
21 | |||
22 | ############################# DEPEDENCES ######################################## |
|
22 | ############################# DEPEDENCES ######################################## | |
23 |
|
23 | |||
24 | win32-msvc*: LIBS += User32.lib |
|
24 | win32-msvc*: LIBS += User32.lib | |
25 | LIBS -= -l$$LIBRARY_NAME |
|
25 | LIBS -= -l$$LIBRARY_NAME | |
26 | INCLUDEPATH += ../include . |
|
26 | INCLUDEPATH += ../include . | |
27 |
|
27 | |||
28 | ############################# SOURCES ########################################## |
|
28 | ############################# SOURCES ########################################## | |
29 |
|
29 | |||
30 | SOURCES += \ |
|
30 | SOURCES += \ | |
31 | $$PWD/chartdataset.cpp \ |
|
31 | $$PWD/chartdataset.cpp \ | |
32 | $$PWD/chartpresenter.cpp \ |
|
32 | $$PWD/chartpresenter.cpp \ | |
33 | $$PWD/charttheme.cpp \ |
|
33 | $$PWD/charttheme.cpp \ | |
34 | $$PWD/domain.cpp \ |
|
34 | $$PWD/domain.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/chart.cpp \ |
|
39 | $$PWD/chart.cpp \ | |
40 | $$PWD/scroller.cpp |
|
40 | $$PWD/scroller.cpp | |
41 | PRIVATE_HEADERS += \ |
|
41 | PRIVATE_HEADERS += \ | |
42 | $$PWD/chartdataset_p.h \ |
|
42 | $$PWD/chartdataset_p.h \ | |
43 | $$PWD/chartitem_p.h \ |
|
43 | $$PWD/chartitem_p.h \ | |
44 | $$PWD/chartpresenter_p.h \ |
|
44 | $$PWD/chartpresenter_p.h \ | |
45 | $$PWD/charttheme_p.h \ |
|
45 | $$PWD/charttheme_p.h \ | |
46 | $$PWD/domain_p.h \ |
|
46 | $$PWD/domain_p.h \ | |
47 | $$PWD/chartbackground_p.h \ |
|
47 | $$PWD/chartbackground_p.h \ | |
48 | $$PWD/chart_p.h \ |
|
48 | $$PWD/chart_p.h \ | |
49 | $$PWD/chartconfig_p.h \ |
|
49 | $$PWD/chartconfig_p.h \ | |
50 | $$PWD/qchart_p.h \ |
|
50 | $$PWD/qchart_p.h \ | |
51 | $$PWD/qchartview_p.h \ |
|
51 | $$PWD/qchartview_p.h \ | |
52 | $$PWD/scroller_p.h \ |
|
52 | $$PWD/scroller_p.h \ | |
53 | $$PWD/qabstractseries_p.h |
|
53 | $$PWD/qabstractseries_p.h | |
54 | PUBLIC_HEADERS += \ |
|
54 | PUBLIC_HEADERS += \ | |
55 | $$PWD/qchart.h \ |
|
55 | $$PWD/qchart.h \ | |
56 | $$PWD/qchartglobal.h \ |
|
56 | $$PWD/qchartglobal.h \ | |
57 | $$PWD/qabstractseries.h \ |
|
57 | $$PWD/qabstractseries.h \ | |
58 | $$PWD/qchartview.h |
|
58 | $$PWD/qchartview.h | |
59 |
|
59 | |||
60 | include(animations/animations.pri) |
|
60 | include(animations/animations.pri) | |
61 | include(areachart/areachart.pri) |
|
61 | include(areachart/areachart.pri) | |
62 | include(axis/axis.pri) |
|
62 | include(axis/axis.pri) | |
63 | include(barchart/barchart.pri) |
|
63 | include(barchart/barchart.pri) | |
64 | include(legend/legend.pri) |
|
64 | include(legend/legend.pri) | |
65 | include(linechart/linechart.pri) |
|
65 | include(linechart/linechart.pri) | |
66 | include(piechart/piechart.pri) |
|
66 | include(piechart/piechart.pri) | |
67 | include(scatterchart/scatter.pri) |
|
67 | include(scatterchart/scatter.pri) | |
68 | include(splinechart/splinechart.pri) |
|
68 | include(splinechart/splinechart.pri) | |
69 | include(themes/themes.pri) |
|
69 | include(themes/themes.pri) | |
70 | include(xychart/xychart.pri) |
|
70 | include(xychart/xychart.pri) | |
71 |
|
71 | |||
72 | HEADERS += $$PUBLIC_HEADERS |
|
72 | HEADERS += $$PUBLIC_HEADERS | |
73 | HEADERS += $$PRIVATE_HEADERS |
|
73 | HEADERS += $$PRIVATE_HEADERS | |
74 | HEADERS += $$THEMES |
|
74 | HEADERS += $$THEMES | |
75 |
|
75 | |||
76 | ############################# BUILD PATH ########################################## |
|
76 | ############################# BUILD PATH ########################################## | |
77 |
|
77 | |||
78 | OBJECTS_DIR = $$CHART_BUILD_DIR/lib |
|
78 | OBJECTS_DIR = $$CHART_BUILD_DIR/lib | |
79 | MOC_DIR = $$CHART_BUILD_DIR/lib |
|
79 | MOC_DIR = $$CHART_BUILD_DIR/lib | |
80 | UI_DIR = $$CHART_BUILD_DIR/lib |
|
80 | UI_DIR = $$CHART_BUILD_DIR/lib | |
81 | RCC_DIR = $$CHART_BUILD_DIR/lib |
|
81 | RCC_DIR = $$CHART_BUILD_DIR/lib | |
82 |
|
82 | |||
83 | ############################# PUBLIC HEADERS GENERTOR ########################################## |
|
83 | ############################# PUBLIC HEADERS GENERTOR ########################################## | |
84 |
|
84 | |||
85 | #this is very primitive and lame parser , TODO: make perl script insted |
|
85 | #this is very primitive and lame parser , TODO: make perl script insted | |
86 | !exists($$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal) |
|
86 | !exists($$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal) | |
87 | { |
|
87 | { | |
88 | system($$QMAKE_MKDIR $$CHART_BUILD_PUBLIC_HEADER_DIR) |
|
88 | system($$QMAKE_MKDIR $$CHART_BUILD_PUBLIC_HEADER_DIR) | |
89 | win32:{ |
|
89 | win32:{ | |
90 | command = "echo $${LITERAL_HASH}include \"qchartglobal.h\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" |
|
90 | command = "echo $${LITERAL_HASH}include \"qchartglobal.h\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" | |
91 | }else{ |
|
91 | }else{ | |
92 | command = "echo \"$${LITERAL_HASH}include \\\"qchartglobal.h\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" |
|
92 | command = "echo \"$${LITERAL_HASH}include \\\"qchartglobal.h\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal" | |
93 | } |
|
93 | } | |
94 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal |
|
94 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal | |
95 | system($$command) |
|
95 | system($$command) | |
96 | } |
|
96 | } | |
97 |
|
97 | |||
98 | for(file, PUBLIC_HEADERS) { |
|
98 | for(file, PUBLIC_HEADERS) { | |
99 | name = $$split(file,'/') |
|
99 | name = $$split(file,'/') | |
100 | name = $$last(name) |
|
100 | name = $$last(name) | |
101 | class = "$$cat($$file)" |
|
101 | class = "$$cat($$file)" | |
102 | class = $$find(class,class) |
|
102 | class = $$find(class,class) | |
103 | !isEmpty(class){ |
|
103 | !isEmpty(class){ | |
104 | class = $$split(class,QTCOMMERCIALCHART_EXPORT) |
|
104 | class = $$split(class,QTCOMMERCIALCHART_EXPORT) | |
105 | class = $$member(class,1) |
|
105 | class = $$member(class,1) | |
106 | class = $$split(class,' ') |
|
106 | class = $$split(class,' ') | |
107 | class = $$replace(class,' ','') |
|
107 | class = $$replace(class,' ','') | |
108 | class = $$member(class,0) |
|
108 | class = $$member(class,0) | |
109 | win32:{ |
|
109 | win32:{ | |
110 | command = "echo $${LITERAL_HASH}include \"$$name\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class" |
|
110 | command = "echo $${LITERAL_HASH}include \"$$name\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class" | |
111 | }else{ |
|
111 | }else{ | |
112 | command = "echo \"$${LITERAL_HASH}include \\\"$$name\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class" |
|
112 | command = "echo \"$${LITERAL_HASH}include \\\"$$name\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class" | |
113 | } |
|
113 | } | |
114 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class |
|
114 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class | |
115 | system($$command) |
|
115 | system($$command) | |
116 | } |
|
116 | } | |
117 | } |
|
117 | } | |
118 |
|
118 | |||
119 | ############################# INSTALLERS ########################################## |
|
119 | ############################# INSTALLERS ########################################## | |
120 |
|
120 | |||
121 | public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart |
|
121 | public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart | |
122 | public_headers.files = $$PUBLIC_HEADERS $$PUBLIC_QT_HEADERS |
|
122 | public_headers.files = $$PUBLIC_HEADERS $$PUBLIC_QT_HEADERS | |
123 | INSTALLS += public_headers |
|
123 | INSTALLS += public_headers | |
124 |
|
124 | |||
125 | install_build_public_headers.name = build_public_headers |
|
125 | install_build_public_headers.name = build_public_headers | |
126 | install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h |
|
126 | install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h | |
127 | install_build_public_headers.input = PUBLIC_HEADERS |
|
127 | install_build_public_headers.input = PUBLIC_HEADERS | |
128 | install_build_public_headers.commands = $$QMAKE_COPY \ |
|
128 | install_build_public_headers.commands = $$QMAKE_COPY \ | |
129 | ${QMAKE_FILE_NAME} \ |
|
129 | ${QMAKE_FILE_NAME} \ | |
130 | $$CHART_BUILD_PUBLIC_HEADER_DIR |
|
130 | $$CHART_BUILD_PUBLIC_HEADER_DIR | |
131 | install_build_public_headers.CONFIG += target_predeps \ |
|
131 | install_build_public_headers.CONFIG += target_predeps \ | |
132 | no_link |
|
132 | no_link | |
133 |
|
133 | |||
134 | install_build_private_headers.name = buld_private_headers |
|
134 | install_build_private_headers.name = buld_private_headers | |
135 | install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h |
|
135 | install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h | |
136 | install_build_private_headers.input = PRIVATE_HEADERS |
|
136 | install_build_private_headers.input = PRIVATE_HEADERS | |
137 | install_build_private_headers.commands = $$QMAKE_COPY \ |
|
137 | install_build_private_headers.commands = $$QMAKE_COPY \ | |
138 | ${QMAKE_FILE_NAME} \ |
|
138 | ${QMAKE_FILE_NAME} \ | |
139 | $$CHART_BUILD_PRIVATE_HEADER_DIR |
|
139 | $$CHART_BUILD_PRIVATE_HEADER_DIR | |
140 | install_build_private_headers.CONFIG += target_predeps \ |
|
140 | install_build_private_headers.CONFIG += target_predeps \ | |
141 | no_link |
|
141 | no_link | |
142 |
|
142 | |||
143 | QMAKE_EXTRA_COMPILERS += install_build_public_headers \ |
|
143 | QMAKE_EXTRA_COMPILERS += install_build_public_headers \ | |
144 | install_build_private_headers \ |
|
144 | install_build_private_headers \ | |
145 |
|
145 | |||
146 | win32:{ |
|
146 | win32:{ | |
147 | bintarget.CONFIG += no_check_exist |
|
147 | bintarget.CONFIG += no_check_exist | |
148 | bintarget.files = $$CHART_BUILD_LIB_DIR\\$${TARGET}.dll |
|
148 | bintarget.files = $$CHART_BUILD_LIB_DIR\\$${TARGET}.dll | |
149 | win32-msvc*:CONFIG(debug, debug|release): { |
|
149 | win32-msvc*:CONFIG(debug, debug|release): { | |
150 | bintarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.pdb |
|
150 | bintarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.pdb | |
151 | } |
|
151 | } | |
152 | bintarget.path = $$[QT_INSTALL_BINS] |
|
152 | bintarget.path = $$[QT_INSTALL_BINS] | |
153 |
|
153 | |||
154 | libtarget.CONFIG += no_check_exist |
|
154 | libtarget.CONFIG += no_check_exist | |
155 | libtarget.files = $$CHART_BUILD_LIB_DIR\\$${TARGET}.prl |
|
155 | libtarget.files = $$CHART_BUILD_LIB_DIR\\$${TARGET}.prl | |
156 | win32-msvc*: { |
|
156 | win32-msvc*: { | |
157 | libtarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.lib |
|
157 | libtarget.files += $$CHART_BUILD_LIB_DIR\\$${TARGET}.lib | |
158 | } else { |
|
158 | } else { | |
159 | libtarget.files += $$CHART_BUILD_LIB_DIR\\lib$${TARGET}.a |
|
159 | libtarget.files += $$CHART_BUILD_LIB_DIR\\lib$${TARGET}.a | |
160 | } |
|
160 | } | |
161 | libtarget.path = $$[QT_INSTALL_LIBS] |
|
161 | libtarget.path = $$[QT_INSTALL_LIBS] | |
162 |
|
162 | |||
163 | DLLDESTDIR = $$CHART_BUILD_BIN_DIR |
|
163 | DLLDESTDIR = $$CHART_BUILD_BIN_DIR | |
164 | INSTALLS += bintarget libtarget |
|
164 | INSTALLS += bintarget libtarget | |
165 | }else{ |
|
165 | }else{ | |
166 | target.path=$$[QT_INSTALL_LIBS] |
|
166 | target.path=$$[QT_INSTALL_LIBS] | |
167 | INSTALLS += target |
|
167 | INSTALLS += target | |
168 | } |
|
168 | } | |
169 |
|
169 | |||
170 | mac: { |
|
170 | mac: { | |
171 |
# Update the name (id) of the library on OSX to point to the lib |
|
171 | # Update the name (id) of the library on OSX to point to the lib path | |
172 | MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib" |
|
172 | MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib" | |
173 | QMAKE_POST_LINK += "install_name_tool -id $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME" |
|
173 | QMAKE_POST_LINK += "install_name_tool -id $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME" | |
|
174 | ||||
|
175 | # Update the name (id) of the installed library on OSX to point to the installation path | |||
|
176 | postinstall.path = $$[QT_INSTALL_LIBS] | |||
|
177 | postinstall.extra = "install_name_tool -id $$[QT_INSTALL_LIBS]"/"$$MAC_CHARTS_LIB_NAME $$[QT_INSTALL_LIBS]"/"$$MAC_CHARTS_LIB_NAME" | |||
|
178 | INSTALLS += postinstall | |||
174 | } |
|
179 | } | |
175 |
|
180 | |||
176 | ################################ DEVELOPMENT BUILD ########################################## |
|
181 | ################################ DEVELOPMENT BUILD ########################################## | |
177 | # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly. |
|
182 | # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly. | |
178 | # This is the case at least with shadow builds. |
|
183 | # This is the case at least with shadow builds. | |
179 | # http://qt-project.org/wiki/jom |
|
184 | # http://qt-project.org/wiki/jom | |
180 |
|
185 | |||
181 | development_build:!win32-msvc*:{ |
|
186 | development_build:!win32-msvc*:{ | |
182 | chartversion.target = $$PWD/qchartversion_p.h |
|
187 | chartversion.target = $$PWD/qchartversion_p.h | |
183 |
|
188 | |||
184 | unix:{ |
|
189 | unix:{ | |
185 | chartversion.commands = @echo \ |
|
190 | chartversion.commands = @echo \ | |
186 | \" $${LITERAL_HASH}ifndef QCHARTVERSION_P_H\\n\ |
|
191 | \" $${LITERAL_HASH}ifndef QCHARTVERSION_P_H\\n\ | |
187 | $${LITERAL_HASH}define QCHARTVERSION_P_H\\n\ |
|
192 | $${LITERAL_HASH}define QCHARTVERSION_P_H\\n\ | |
188 | const char *buildTime = \\\"`date +'%y%m%d%H%M'`\\\" ; \\n\ |
|
193 | const char *buildTime = \\\"`date +'%y%m%d%H%M'`\\\" ; \\n\ | |
189 | const char *gitHead = \\\"`git rev-parse HEAD`\\\" ; \\n \ |
|
194 | const char *gitHead = \\\"`git rev-parse HEAD`\\\" ; \\n \ | |
190 | $${LITERAL_HASH}endif \" \ |
|
195 | $${LITERAL_HASH}endif \" \ | |
191 | > \ |
|
196 | > \ | |
192 | $$chartversion.target; |
|
197 | $$chartversion.target; | |
193 | }else{ |
|
198 | }else{ | |
194 | chartversion.commands = @echo \ |
|
199 | chartversion.commands = @echo \ | |
195 | "const char *buildTime = \"%date%_%time%\" ; \ |
|
200 | "const char *buildTime = \"%date%_%time%\" ; \ | |
196 | const char *gitHead = \"unknown\" ; " \ |
|
201 | const char *gitHead = \"unknown\" ; " \ | |
197 | > \ |
|
202 | > \ | |
198 | $$chartversion.target |
|
203 | $$chartversion.target | |
199 | } |
|
204 | } | |
200 |
|
205 | |||
201 | chartversion.depends = $$HEADERS \ |
|
206 | chartversion.depends = $$HEADERS \ | |
202 | $$SOURCES |
|
207 | $$SOURCES | |
203 |
|
208 | |||
204 | PRE_TARGETDEPS += $$chartversion.target |
|
209 | PRE_TARGETDEPS += $$chartversion.target | |
205 | QMAKE_CLEAN += $$PWD/qchartversion_p.h |
|
210 | QMAKE_CLEAN += $$PWD/qchartversion_p.h | |
206 | QMAKE_EXTRA_TARGETS += chartversion |
|
211 | QMAKE_EXTRA_TARGETS += chartversion | |
207 | } |
|
212 | } | |
208 |
|
213 | |||
209 | ############################### CLEAN ########################################### |
|
214 | ############################### CLEAN ########################################### | |
210 |
|
215 | |||
211 | unix:QMAKE_DISTCLEAN += -r \ |
|
216 | unix:QMAKE_DISTCLEAN += -r \ | |
212 | $$CHART_BUILD_HEADER_DIR \ |
|
217 | $$CHART_BUILD_HEADER_DIR \ | |
213 | $$CHART_BUILD_LIB_DIR |
|
218 | $$CHART_BUILD_LIB_DIR | |
214 | win32:QMAKE_DISTCLEAN += /Q \ |
|
219 | win32:QMAKE_DISTCLEAN += /Q \ | |
215 | $$CHART_BUILD_HEADER_DIR \ |
|
220 | $$CHART_BUILD_HEADER_DIR \ | |
216 | $$CHART_BUILD_LIB_DIR |
|
221 | $$CHART_BUILD_LIB_DIR | |
217 |
|
222 | |||
218 | ############################## COVERAGE ######################################### |
|
223 | ############################## COVERAGE ######################################### | |
219 |
|
224 | |||
220 | unix:coverage:{ |
|
225 | unix:coverage:{ | |
221 |
|
226 | |||
222 | QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage |
|
227 | QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage | |
223 | QMAKE_LDFLAGS += -fprofile-arcs -ftest-coverage |
|
228 | QMAKE_LDFLAGS += -fprofile-arcs -ftest-coverage | |
224 |
|
229 | |||
225 | LIBS += -lgcov |
|
230 | LIBS += -lgcov | |
226 |
|
231 | |||
227 | QMAKE_CLEAN += $$OBJECTS_DIR/*.gcda $$OBJECTS_DIR/*.gcno $$PWD/*.gcov ../coverage/*.info |
|
232 | QMAKE_CLEAN += $$OBJECTS_DIR/*.gcda $$OBJECTS_DIR/*.gcno $$PWD/*.gcov ../coverage/*.info | |
228 | QMAKE_EXTRA_TARGETS += preparecoverage gencoverage |
|
233 | QMAKE_EXTRA_TARGETS += preparecoverage gencoverage | |
229 |
|
234 | |||
230 | preparecoverage.target = prepare_coverage |
|
235 | preparecoverage.target = prepare_coverage | |
231 | preparecoverage.depends = all |
|
236 | preparecoverage.depends = all | |
232 | preparecoverage.commands = lcov --directory $$OBJECTS_DIR --zerocounters ;\ |
|
237 | preparecoverage.commands = lcov --directory $$OBJECTS_DIR --zerocounters ;\ | |
233 | lcov -i -d $$OBJECTS_DIR -c -o ../coverage/base.info -b $$PWD; |
|
238 | lcov -i -d $$OBJECTS_DIR -c -o ../coverage/base.info -b $$PWD; | |
234 |
|
239 | |||
235 | gencoverage.target = gen_coverage |
|
240 | gencoverage.target = gen_coverage | |
236 | gencoverage.depends = all |
|
241 | gencoverage.depends = all | |
237 | gencoverage.commands = lcov -d $$OBJECTS_DIR -c -o ../coverage/src.info -b $$PWD;\ |
|
242 | gencoverage.commands = lcov -d $$OBJECTS_DIR -c -o ../coverage/src.info -b $$PWD;\ | |
238 | 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;\ |
|
243 | 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;\ | |
239 | 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;\ |
|
244 | 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;\ | |
240 | lcov -a ../coverage/base.info -a ../coverage/src.info -o ../coverage/coverage.info; |
|
245 | lcov -a ../coverage/base.info -a ../coverage/src.info -o ../coverage/coverage.info; | |
241 | } |
|
246 | } | |
242 |
|
247 |
General Comments 0
You need to be logged in to leave comments.
Login now