@@ -1,13 +1,27 | |||||
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 ###################################### | |||
|
4 | ||||
3 | TARGET = $$LIBRARY_NAME |
|
5 | TARGET = $$LIBRARY_NAME | |
4 | DESTDIR = $$CHART_BUILD_LIB_DIR |
|
6 | DESTDIR = $$CHART_BUILD_LIB_DIR | |
5 | TEMPLATE = lib |
|
7 | TEMPLATE = lib | |
6 | QT = core gui |
|
8 | QT = core gui | |
|
9 | DEFINES += QTCOMMERCIALCHART_LIBRARY | |||
|
10 | win32:CONFIG+=create_prl | |||
|
11 | # treat warnings as errors | |||
|
12 | win32-msvc*: { | |||
|
13 | QMAKE_CXXFLAGS += /WX | |||
|
14 | } else { | |||
|
15 | QMAKE_CXXFLAGS += -Werror | |||
|
16 | } | |||
|
17 | ||||
|
18 | ############################# DEPEDENCES ######################################## | |||
7 |
|
19 | |||
8 | win32-msvc*: LIBS += User32.lib |
|
20 | win32-msvc*: LIBS += User32.lib | |
9 |
|
||||
10 | LIBS -= -l$$LIBRARY_NAME |
|
21 | LIBS -= -l$$LIBRARY_NAME | |
|
22 | INCLUDEPATH += ../include . | |||
|
23 | ||||
|
24 | ############################# SOURCES ########################################## | |||
11 |
|
25 | |||
12 | SOURCES += \ |
|
26 | SOURCES += \ | |
13 | $$PWD/chartdataset.cpp \ |
|
27 | $$PWD/chartdataset.cpp \ | |
@@ -54,15 +68,16 include(xychart/xychart.pri) | |||||
54 | HEADERS += $$PUBLIC_HEADERS |
|
68 | HEADERS += $$PUBLIC_HEADERS | |
55 | HEADERS += $$PRIVATE_HEADERS |
|
69 | HEADERS += $$PRIVATE_HEADERS | |
56 | HEADERS += $$THEMES |
|
70 | HEADERS += $$THEMES | |
57 | INCLUDEPATH += ../include . |
|
71 | ||
|
72 | ############################# BUILD PATH ########################################## | |||
58 |
|
73 | |||
59 | OBJECTS_DIR = $$CHART_BUILD_DIR/lib |
|
74 | OBJECTS_DIR = $$CHART_BUILD_DIR/lib | |
60 | MOC_DIR = $$CHART_BUILD_DIR/lib |
|
75 | MOC_DIR = $$CHART_BUILD_DIR/lib | |
61 | UI_DIR = $$CHART_BUILD_DIR/lib |
|
76 | UI_DIR = $$CHART_BUILD_DIR/lib | |
62 | RCC_DIR = $$CHART_BUILD_DIR/lib |
|
77 | RCC_DIR = $$CHART_BUILD_DIR/lib | |
63 | DEFINES += QTCOMMERCIALCHART_LIBRARY |
|
|||
64 |
|
78 | |||
65 | #qt public headers |
|
79 | ############################# PUBLIC HEADERS GENERTOR ########################################## | |
|
80 | ||||
66 | #this is very primitive and lame parser , TODO: make perl script insted |
|
81 | #this is very primitive and lame parser , TODO: make perl script insted | |
67 | !exists($$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal) |
|
82 | !exists($$CHART_BUILD_PUBLIC_HEADER_DIR/QChartGlobal) | |
68 | { |
|
83 | { | |
@@ -97,18 +112,11 for(file, PUBLIC_HEADERS) { | |||||
97 | } |
|
112 | } | |
98 | } |
|
113 | } | |
99 |
|
114 | |||
|
115 | ############################# INSTALLERS ########################################## | |||
|
116 | ||||
100 | public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart |
|
117 | public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart | |
101 | public_headers.files = $$PUBLIC_HEADERS $$PUBLIC_QT_HEADERS |
|
118 | public_headers.files = $$PUBLIC_HEADERS $$PUBLIC_QT_HEADERS | |
102 |
|
119 | INSTALLS += public_headers | ||
103 | dlltarget.commands = $(COPY_FILE) $(DESTDIR_TARGET) $$[QT_INSTALL_BINS] |
|
|||
104 |
|
||||
105 | win32 { |
|
|||
106 | dlltarget.path=$$[QT_INSTALL_BINS] |
|
|||
107 | INSTALLS += dlltarget |
|
|||
108 | } |
|
|||
109 |
|
||||
110 | target.path=$$[QT_INSTALL_LIBS] |
|
|||
111 | INSTALLS += target public_headers |
|
|||
112 |
|
120 | |||
113 | install_build_public_headers.name = build_public_headers |
|
121 | install_build_public_headers.name = build_public_headers | |
114 | install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h |
|
122 | install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h | |
@@ -131,6 +139,19 install_build_private_headers.CONFIG += target_predeps \ | |||||
131 | QMAKE_EXTRA_COMPILERS += install_build_public_headers \ |
|
139 | QMAKE_EXTRA_COMPILERS += install_build_public_headers \ | |
132 | install_build_private_headers \ |
|
140 | install_build_private_headers \ | |
133 |
|
141 | |||
|
142 | target.path=$$[QT_INSTALL_LIBS] | |||
|
143 | INSTALLS += target | |||
|
144 | ||||
|
145 | win32:{ | |||
|
146 | dlltarget.commands = $(COPY_FILE) $(DESTDIR_TARGET) $$[QT_INSTALL_BINS] | |||
|
147 | DLLDESTDIR = $$CHART_BUILD_BIN_DIR | |||
|
148 | dlltarget.path=$$[QT_INSTALL_BINS] | |||
|
149 | target.files= ..\\lib\\*.a ..\\lib\\*.prl | |||
|
150 | INSTALLS += dlltarget | |||
|
151 | } | |||
|
152 | ||||
|
153 | ||||
|
154 | ################################ DEVELOPMENT BUILD ########################################## | |||
134 | # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly. |
|
155 | # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly. | |
135 | # This is the case at least with shadow builds. |
|
156 | # This is the case at least with shadow builds. | |
136 | # http://qt-project.org/wiki/jom |
|
157 | # http://qt-project.org/wiki/jom | |
@@ -163,6 +184,8 development_build:!win32-msvc*:{ | |||||
163 | QMAKE_EXTRA_TARGETS += chartversion |
|
184 | QMAKE_EXTRA_TARGETS += chartversion | |
164 | } |
|
185 | } | |
165 |
|
186 | |||
|
187 | ############################### CLEAN ########################################### | |||
|
188 | ||||
166 | unix:QMAKE_DISTCLEAN += -r \ |
|
189 | unix:QMAKE_DISTCLEAN += -r \ | |
167 | $$CHART_BUILD_HEADER_DIR \ |
|
190 | $$CHART_BUILD_HEADER_DIR \ | |
168 | $$CHART_BUILD_LIB_DIR |
|
191 | $$CHART_BUILD_LIB_DIR | |
@@ -170,9 +193,3 win32:QMAKE_DISTCLEAN += /Q \ | |||||
170 | $$CHART_BUILD_HEADER_DIR \ |
|
193 | $$CHART_BUILD_HEADER_DIR \ | |
171 | $$CHART_BUILD_LIB_DIR |
|
194 | $$CHART_BUILD_LIB_DIR | |
172 |
|
195 | |||
173 | # treat warnings as errors |
|
|||
174 | win32-msvc*: { |
|
|||
175 | QMAKE_CXXFLAGS += /WX |
|
|||
176 | } else { |
|
|||
177 | QMAKE_CXXFLAGS += -Werror |
|
|||
178 | } |
|
General Comments 0
You need to be logged in to leave comments.
Login now