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