@@ -1,138 +1,142 | |||
|
1 | 1 | !include( ../common.pri ):error( Couldn't find the common.pri file! ) |
|
2 | 2 | TARGET = QtCommercialChart |
|
3 | 3 | DESTDIR = $$CHART_BUILD_LIB_DIR |
|
4 | 4 | TEMPLATE = lib |
|
5 | 5 | QT += core \ |
|
6 | 6 | gui |
|
7 | 7 | win32-msvc*: LIBS += User32.lib |
|
8 | 8 | CONFIG += debug_and_release |
|
9 | 9 | CONFIG(debug, debug|release):TARGET = QtCommercialChartd |
|
10 | 10 | SOURCES += \ |
|
11 | 11 | chartdataset.cpp \ |
|
12 | 12 | chartpresenter.cpp \ |
|
13 | 13 | charttheme.cpp \ |
|
14 | 14 | domain.cpp \ |
|
15 | 15 | qchart.cpp \ |
|
16 | 16 | qchartview.cpp \ |
|
17 | 17 | qseries.cpp \ |
|
18 | 18 | qlegend.cpp \ |
|
19 | 19 | legendmarker.cpp |
|
20 | 20 | PRIVATE_HEADERS += \ |
|
21 | 21 | chartdataset_p.h \ |
|
22 | 22 | chartitem_p.h \ |
|
23 | 23 | chartpresenter_p.h \ |
|
24 | 24 | charttheme_p.h \ |
|
25 | 25 | domain_p.h \ |
|
26 | 26 | legendmarker_p.h |
|
27 | 27 | PUBLIC_HEADERS += \ |
|
28 | 28 | qchart.h \ |
|
29 | 29 | qchartglobal.h \ |
|
30 | 30 | qseries.h \ |
|
31 | 31 | qchartview.h \ |
|
32 | 32 | qlegend.h |
|
33 | 33 | |
|
34 | 34 | include(animations/animations.pri) |
|
35 | 35 | include(axis/axis.pri) |
|
36 | 36 | include(xychart/xychart.pri) |
|
37 | 37 | include(linechart/linechart.pri) |
|
38 | 38 | include(areachart/areachart.pri) |
|
39 | 39 | include(barchart/barchart.pri) |
|
40 | 40 | include(piechart/piechart.pri) |
|
41 | 41 | include(scatterseries/scatter.pri) |
|
42 | 42 | include(splinechart/splinechart.pri) |
|
43 | 43 | |
|
44 | 44 | THEMES += themes/chartthemedefault_p.h \ |
|
45 | 45 | themes/chartthemeicy_p.h \ |
|
46 | 46 | themes/chartthemegrayscale_p.h \ |
|
47 | 47 | themes/chartthemescientific_p.h \ |
|
48 | 48 | themes/chartthemevanilla_p.h \ |
|
49 | 49 | themes/chartthemebluecerulean_p.h \ |
|
50 | 50 | themes/chartthemelight_p.h |
|
51 | 51 | |
|
52 | 52 | HEADERS += $$PUBLIC_HEADERS |
|
53 | 53 | HEADERS += $$PRIVATE_HEADERS |
|
54 | 54 | HEADERS += $$THEMES |
|
55 | 55 | INCLUDEPATH += linechart \ |
|
56 | 56 | barchart \ |
|
57 | 57 | themes \ |
|
58 | 58 | . |
|
59 | 59 | OBJECTS_DIR = $$CHART_BUILD_DIR/lib |
|
60 | 60 | MOC_DIR = $$CHART_BUILD_DIR/lib |
|
61 | 61 | UI_DIR = $$CHART_BUILD_DIR/lib |
|
62 | 62 | RCC_DIR = $$CHART_BUILD_DIR/lib |
|
63 | 63 | DEFINES += QTCOMMERCIALCHART_LIBRARY |
|
64 | 64 | |
|
65 | 65 | #qt public headers |
|
66 | 66 | #this is very primitive and lame parser , TODO: make perl script insted |
|
67 | 67 | !exists($$CHART_BUILD_PUBLIC_HEADER_DIR) |
|
68 | 68 | { |
|
69 | 69 | system($$QMAKE_MKDIR $$CHART_BUILD_PUBLIC_HEADER_DIR) |
|
70 | 70 | } |
|
71 | 71 | |
|
72 | 72 | for(file, PUBLIC_HEADERS) { |
|
73 | 73 | name = $$split(file,'/') |
|
74 | 74 | name = $$last(name) |
|
75 | 75 | class = "$$cat($$file)" |
|
76 | 76 | class = $$find(class,class) |
|
77 | 77 | !isEmpty(class){ |
|
78 | 78 | class = $$split(class,QTCOMMERCIALCHART_EXPORT) |
|
79 | 79 | class = $$member(class,1) |
|
80 | 80 | class = $$split(class,' ') |
|
81 | 81 | class = $$replace(class,' ','') |
|
82 | 82 | class = $$member(class,0) |
|
83 | command = "echo \"$${LITERAL_HASH}include \\\"$$name\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class" | |
|
83 | win32:{ | |
|
84 | command = "echo $${LITERAL_HASH}include \"$$name\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class" | |
|
85 | }else{ | |
|
86 | command = "echo \"$${LITERAL_HASH}include \\\"$$name\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class" | |
|
87 | } | |
|
84 | 88 | PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class |
|
85 | 89 | system($$command) |
|
86 | 90 | } |
|
87 | 91 | } |
|
88 | 92 | |
|
89 | 93 | public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart |
|
90 | 94 | public_headers.files = $$PUBLIC_HEADERS $$PUBLIC_QT_HEADERS |
|
91 | 95 | |
|
92 | 96 | target.path = $$[QT_INSTALL_LIBS] |
|
93 | 97 | INSTALLS += target public_headers |
|
94 | 98 | |
|
95 | 99 | install_build_public_headers.name = build_public_headers |
|
96 | 100 | install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h |
|
97 | 101 | install_build_public_headers.input = PUBLIC_HEADERS |
|
98 | 102 | install_build_public_headers.commands = $$QMAKE_COPY \ |
|
99 | 103 | ${QMAKE_FILE_NAME} \ |
|
100 | 104 | $$CHART_BUILD_PUBLIC_HEADER_DIR |
|
101 | 105 | install_build_public_headers.CONFIG += target_predeps \ |
|
102 | 106 | no_link |
|
103 | 107 | |
|
104 | 108 | install_build_private_headers.name = buld_private_headers |
|
105 | 109 | install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h |
|
106 | 110 | install_build_private_headers.input = PRIVATE_HEADERS |
|
107 | 111 | install_build_private_headers.commands = $$QMAKE_COPY \ |
|
108 | 112 | ${QMAKE_FILE_NAME} \ |
|
109 | 113 | $$CHART_BUILD_PRIVATE_HEADER_DIR |
|
110 | 114 | install_build_private_headers.CONFIG += target_predeps \ |
|
111 | 115 | no_link |
|
112 | 116 | |
|
113 | 117 | QMAKE_EXTRA_COMPILERS += install_build_public_headers \ |
|
114 | 118 | install_build_private_headers \ |
|
115 | 119 | |
|
116 | 120 | chartversion.target = qchartversion_p.h |
|
117 | 121 | chartversion.commands = @echo \ |
|
118 | 122 | "build_time" \ |
|
119 | 123 | > \ |
|
120 | 124 | $$chartversion.target; |
|
121 | 125 | chartversion.depends = $$HEADERS \ |
|
122 | 126 | $$SOURCES |
|
123 | 127 | PRE_TARGETDEPS += qchartversion_p.h |
|
124 | 128 | QMAKE_CLEAN += qchartversion_p.h |
|
125 | 129 | QMAKE_EXTRA_TARGETS += chartversion |
|
126 | 130 | unix:QMAKE_DISTCLEAN += -r \ |
|
127 | 131 | $$CHART_BUILD_HEADER_DIR \ |
|
128 | 132 | $$CHART_BUILD_LIB_DIR |
|
129 | 133 | win32:QMAKE_DISTCLEAN += /Q \ |
|
130 | 134 | $$CHART_BUILD_HEADER_DIR \ |
|
131 | 135 | $$CHART_BUILD_LIB_DIR |
|
132 | 136 | |
|
133 | 137 | # treat warnings as errors |
|
134 | 138 | win32-msvc*: { |
|
135 | 139 | QMAKE_CXXFLAGS += /WX |
|
136 | 140 | } else { |
|
137 | 141 | QMAKE_CXXFLAGS += -Werror |
|
138 | 142 | } |
General Comments 0
You need to be logged in to leave comments.
Login now