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