##// END OF EJS Templates
OSX install name tool now executed only on QtCommercialChart library during build
Tero Ahola -
r1419:9a2b5d956bb6
parent child
Show More
@@ -1,111 +1,95
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
49
50 CHART_BUILD_LIB_DIR = $$CHART_BUILD_BIN_DIR
50 CHART_BUILD_LIB_DIR = $$CHART_BUILD_BIN_DIR
51 }
51 }
52
52
53 ##################### DEVELOPMENT BUILD ###################################################
53 ##################### DEVELOPMENT BUILD ###################################################
54
54
55 development_build: {
55 development_build: {
56 DEFINES+=DEVELOPMENT_BUILD
56 DEFINES+=DEVELOPMENT_BUILD
57 CONFIG+=debug_and_release
57 CONFIG+=debug_and_release
58 }
58 }
59
59
60
60
61 ##################### BUILD CONFIG ########################################################
61 ##################### BUILD CONFIG ########################################################
62
62
63 !system_build:{
63 !system_build:{
64
64
65 INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR
65 INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR
66
66
67 !win32: {
67 !win32: {
68 LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR
68 LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR
69 }else{
69 }else{
70 win32-msvc*: {
70 win32-msvc*: {
71 # hack fix for error:
71 # hack fix for error:
72 # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'"
72 # "LINK : fatal error LNK1146: no argument specified with option '/LIBPATH:'"
73 QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR
73 QMAKE_LIBDIR += $$CHART_BUILD_LIB_DIR
74 }else{
74 }else{
75 LIBS += -L $$CHART_BUILD_LIB_DIR
75 LIBS += -L $$CHART_BUILD_LIB_DIR
76 }
76 }
77 }
77 }
78
78
79 CONFIG(debug, debug|release) {
79 CONFIG(debug, debug|release) {
80 mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug)
80 mac: LIBRARY_NAME = $$join(LIBRARY_NAME,,,_debug)
81 win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d)
81 win32: LIBRARY_NAME = $$join(LIBRARY_NAME,,,d)
82 }
83
84 LIBS += -l$$LIBRARY_NAME
85
86 mac: {
87 # This is a hack; we define variables for easier install_name_tool calls from project files of OSX executables/libraries
88 # install_name_tool is used to update the dependencies to chart library to match the local build folder
89 MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib"
90 CONFIG(debug, debug|release) {
91 MAC_CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib"
92 }
93 MAC_POST_LINK_PREFIX = install_name_tool -change $$MAC_CHARTS_LIB_NAME $$CHART_BUILD_LIB_DIR"/"$$MAC_CHARTS_LIB_NAME
94 MAC_DEMOS_BIN_DIR = $$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET
95 MAC_EXAMPLES_BIN_DIR = $$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET
96 MAC_TESTS_BIN_DIR = $$CHART_BUILD_BIN_DIR"/"$$TARGET".app/Contents/MacOS/"$$TARGET
97 MAC_AUTOTESTS_BIN_DIR = $$CHART_BUILD_BIN_DIR"/tst_"$$TARGET".app/Contents/MacOS/tst_"$$TARGET
98 MAC_PLUGINS_BIN_DIR = $$CHART_BUILD_PLUGIN_DIR"/lib"$$TARGET".dylib"
99 }
82 }
100
83
84 LIBS += -l$$LIBRARY_NAME
101 } else {
85 } else {
102 CONFIG += qtcommercialchart
86 CONFIG += qtcommercialchart
103 }
87 }
104
88
105 ##################### UNIT TESTS ##############################################################
89 ##################### UNIT TESTS ##############################################################
106
90
107 CONFIG(debug, debug|release) {
91 CONFIG(debug, debug|release) {
108 CONFIG+=test_private
92 CONFIG+=test_private
109 DEFINES+=BUILD_PRIVATE_UNIT_TESTS
93 DEFINES+=BUILD_PRIVATE_UNIT_TESTS
110 }
94 }
111
95
@@ -1,12 +1,4
1 !include( ../demos.pri ):error( "Couldn't find the demos.pri file!" )
1 !include( ../demos.pri ):error( "Couldn't find the demos.pri file!" )
2 TARGET = chartthemes
2 TARGET = chartthemes
3 SOURCES = main.cpp themewidget.cpp
3 SOURCES = main.cpp themewidget.cpp
4 HEADERS = themewidget.h
4 HEADERS = themewidget.h
5
6 # This is a hack to make binaries to use the internal version of the QtCommercial Charts library on OSX
7 #CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib"
8 #CONFIG(debug, debug|release) {
9 # CHARTS_LIB_NAME = "lib"$$LIBRARY_NAME".1.dylib"
10 #}
11
12 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -1,6 +1,4
1 !include( ../demos.pri ):error( "Couldn't find the demos.pri file!" )
1 !include( ../demos.pri ):error( "Couldn't find the demos.pri file!" )
2 TARGET = dynamicspline
2 TARGET = dynamicspline
3 HEADERS += chart.h
3 HEADERS += chart.h
4 SOURCES += main.cpp chart.cpp
4 SOURCES += main.cpp chart.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -1,18 +1,15
1 !include( ../demos.pri ) {
1 !include( ../demos.pri ) {
2 error( "Couldn't find the demos.pri file!" )
2 error( "Couldn't find the demos.pri file!" )
3 }
3 }
4 TARGET = piechartcustomization
4 TARGET = piechartcustomization
5 SOURCES += main.cpp \
5 SOURCES += main.cpp \
6 pentool.cpp \
6 pentool.cpp \
7 brushtool.cpp \
7 brushtool.cpp \
8 customslice.cpp \
8 customslice.cpp \
9 mainwidget.cpp
9 mainwidget.cpp
10
10
11 HEADERS += \
11 HEADERS += \
12 pentool.h \
12 pentool.h \
13 brushtool.h \
13 brushtool.h \
14 customslice.h \
14 customslice.h \
15 mainwidget.h
15 mainwidget.h
16
17 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
18
@@ -1,10 +1,8
1 !include( ../demos.pri ) {
1 !include( ../demos.pri ) {
2 error( "Couldn't find the demos.pri file!" )
2 error( "Couldn't find the demos.pri file!" )
3 }
3 }
4
4
5 RESOURCES += resources.qrc
5 RESOURCES += resources.qrc
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
7
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
9
10 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -1,10 +1,8
1 !include( ../demos.pri ) {
1 !include( ../demos.pri ) {
2 error( "Couldn't find the demos.pri file!" )
2 error( "Couldn't find the demos.pri file!" )
3 }
3 }
4
4
5 RESOURCES += resources.qrc
5 RESOURCES += resources.qrc
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
7
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
9
10 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -1,14 +1,12
1 !include( ../demos.pri ) {
1 !include( ../demos.pri ) {
2 error( "Couldn't find the demos.pri file!" )
2 error( "Couldn't find the demos.pri file!" )
3 }
3 }
4
4
5 RESOURCES += resources.qrc
5 RESOURCES += resources.qrc
6 SOURCES += main.cpp\
6 SOURCES += main.cpp\
7 customtablemodel.cpp \
7 customtablemodel.cpp \
8 declarativemodel.cpp
8 declarativemodel.cpp
9 HEADERS += customtablemodel.h \
9 HEADERS += customtablemodel.h \
10 declarativemodel.h
10 declarativemodel.h
11
11
12 include(qmlapplicationviewer/qmlapplicationviewer.pri)
12 include(qmlapplicationviewer/qmlapplicationviewer.pri)
13
14 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -1,10 +1,8
1 !include( ../demos.pri ) {
1 !include( ../demos.pri ) {
2 error( "Couldn't find the demos.pri file!" )
2 error( "Couldn't find the demos.pri file!" )
3 }
3 }
4
4
5 RESOURCES += resources.qrc
5 RESOURCES += resources.qrc
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
7
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
9
10 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -1,10 +1,8
1 !include( ../demos.pri ) {
1 !include( ../demos.pri ) {
2 error( "Couldn't find the demos.pri file!" )
2 error( "Couldn't find the demos.pri file!" )
3 }
3 }
4
4
5 RESOURCES += resources.qrc
5 RESOURCES += resources.qrc
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
7
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
9
10 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -1,7 +1,5
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4 TARGET = areachart
4 TARGET = areachart
5 SOURCES += main.cpp
5 SOURCES += main.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,8 +1,6
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4
4
5 TARGET = barchart
5 TARGET = barchart
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,18 +1,16
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4
4
5 QT += core gui
5 QT += core gui
6
6
7 TARGET = barmodelmapper
7 TARGET = barmodelmapper
8 TEMPLATE = app
8 TEMPLATE = app
9
9
10
10
11 SOURCES += main.cpp\
11 SOURCES += main.cpp\
12 tablewidget.cpp \
12 tablewidget.cpp \
13 customtablemodel.cpp
13 customtablemodel.cpp
14
14
15 HEADERS += tablewidget.h \
15 HEADERS += tablewidget.h \
16 customtablemodel.h
16 customtablemodel.h
17
18 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,8 +1,6
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4
4
5 TARGET = customchart
5 TARGET = customchart
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,8 +1,6
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4
4
5 TARGET = groupedbarchart
5 TARGET = groupedbarchart
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,12 +1,10
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4
4
5 TARGET = legend
5 TARGET = legend
6 SOURCES += main.cpp \
6 SOURCES += main.cpp \
7 mainwidget.cpp
7 mainwidget.cpp
8
8
9 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
10
11 HEADERS += \
9 HEADERS += \
12 mainwidget.h
10 mainwidget.h
@@ -1,7 +1,5
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4 TARGET = linechart
4 TARGET = linechart
5 SOURCES += main.cpp
5 SOURCES += main.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,18 +1,16
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4
4
5 QT += core gui
5 QT += core gui
6
6
7 TARGET = modeldata
7 TARGET = modeldata
8 TEMPLATE = app
8 TEMPLATE = app
9
9
10
10
11 SOURCES += main.cpp\
11 SOURCES += main.cpp\
12 tablewidget.cpp \
12 tablewidget.cpp \
13 customtablemodel.cpp
13 customtablemodel.cpp
14
14
15 HEADERS += tablewidget.h \
15 HEADERS += tablewidget.h \
16 customtablemodel.h
16 customtablemodel.h
17
18 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,8 +1,6
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4
4
5 TARGET = percentbarchart
5 TARGET = percentbarchart
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,7 +1,5
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4 TARGET = piechart
4 TARGET = piechart
5 SOURCES += main.cpp
5 SOURCES += main.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,13 +1,11
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4 TARGET = piechartdrilldown
4 TARGET = piechartdrilldown
5 SOURCES += main.cpp \
5 SOURCES += main.cpp \
6 drilldownslice.cpp \
6 drilldownslice.cpp \
7 drilldownchart.cpp
7 drilldownchart.cpp
8
8
9 HEADERS += \
9 HEADERS += \
10 drilldownchart.h \
10 drilldownchart.h \
11 drilldownslice.h
11 drilldownslice.h
12
13 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,8 +1,6
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4 TARGET = presenterchart
4 TARGET = presenterchart
5 HEADERS += chartview.h
5 HEADERS += chartview.h
6 SOURCES += main.cpp chartview.cpp
6 SOURCES += main.cpp chartview.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,11 +1,9
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4 TARGET = scatterchart
4 TARGET = scatterchart
5 SOURCES += main.cpp \
5 SOURCES += main.cpp \
6 chartview.cpp
6 chartview.cpp
7
7
8 HEADERS += \
8 HEADERS += \
9 chartview.h
9 chartview.h
10
11 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,11 +1,9
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4
4
5 TARGET = scatterinteractions
5 TARGET = scatterinteractions
6 SOURCES += main.cpp \
6 SOURCES += main.cpp \
7 chartview.cpp
7 chartview.cpp
8 HEADERS += \
8 HEADERS += \
9 chartview.h
9 chartview.h
10
11 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,7 +1,5
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4 TARGET = splinechart
4 TARGET = splinechart
5 SOURCES += main.cpp
5 SOURCES += main.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,7 +1,5
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4 TARGET = stackedbarchart
4 TARGET = stackedbarchart
5 SOURCES += main.cpp
5 SOURCES += main.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,8 +1,6
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4 TARGET = stackedbarchartdrilldown
4 TARGET = stackedbarchartdrilldown
5 SOURCES += main.cpp drilldownseries.cpp drilldownchart.cpp
5 SOURCES += main.cpp drilldownseries.cpp drilldownchart.cpp
6 HEADERS += drilldownseries.h drilldownchart.h
6 HEADERS += drilldownseries.h drilldownchart.h
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,9 +1,7
1 !include( ../examples.pri ) {
1 !include( ../examples.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4 TARGET = zoomlinechart
4 TARGET = zoomlinechart
5 HEADERS += chart.h chartview.h
5 HEADERS += chart.h chartview.h
6
6
7 SOURCES += main.cpp chart.cpp chartview.cpp
7 SOURCES += main.cpp chart.cpp chartview.cpp
8
9 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_EXAMPLES_BIN_DIR"
@@ -1,45 +1,44
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 SOURCES += \
13 SOURCES += \
14 plugin.cpp \
14 plugin.cpp \
15 declarativechart.cpp \
15 declarativechart.cpp \
16 declarativexypoint.cpp \
16 declarativexypoint.cpp \
17 declarativexyseries.cpp \
17 declarativexyseries.cpp \
18 declarativelineseries.cpp \
18 declarativelineseries.cpp \
19 declarativesplineseries.cpp \
19 declarativesplineseries.cpp \
20 declarativeareaseries.cpp \
20 declarativeareaseries.cpp \
21 declarativescatterseries.cpp \
21 declarativescatterseries.cpp \
22 declarativepieseries.cpp \
22 declarativepieseries.cpp \
23 declarativebarseries.cpp
23 declarativebarseries.cpp
24
24
25 HEADERS += \
25 HEADERS += \
26 declarativechart.h \
26 declarativechart.h \
27 declarativexypoint.h \
27 declarativexypoint.h \
28 declarativexyseries.h \
28 declarativexyseries.h \
29 declarativelineseries.h \
29 declarativelineseries.h \
30 declarativesplineseries.h \
30 declarativesplineseries.h \
31 declarativeareaseries.h \
31 declarativeareaseries.h \
32 declarativescatterseries.h \
32 declarativescatterseries.h \
33 declarativepieseries.h \
33 declarativepieseries.h \
34 declarativebarseries.h
34 declarativebarseries.h
35
35
36 TARGETPATH = QtCommercial/Chart
36 TARGETPATH = QtCommercial/Chart
37 target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
37 target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
38 qmldir.files += $$PWD/qmldir
38 qmldir.files += $$PWD/qmldir
39 qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
39 qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
40 INSTALLS += target qmldir
40 INSTALLS += target qmldir
41
41
42 FILE = $$PWD/qmldir
42 FILE = $$PWD/qmldir
43 win32:{FILE = $$replace(FILE, "/","\\")}
43 win32:{FILE = $$replace(FILE, "/","\\")}
44 QMAKE_POST_LINK += $$QMAKE_COPY $$FILE $$CHART_BUILD_PLUGIN_DIR
44 QMAKE_POST_LINK += $$QMAKE_COPY $$FILE $$CHART_BUILD_PLUGIN_DIR
45 !system_build:mac: QMAKE_POST_LINK += " & $$MAC_POST_LINK_PREFIX $$MAC_PLUGINS_BIN_DIR"
@@ -1,235 +1,242
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
170 mac: {
171 # Update the name (id) of the library on OSX to point to the lib dir
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"
174 }
175
169 ################################ DEVELOPMENT BUILD ##########################################
176 ################################ DEVELOPMENT BUILD ##########################################
170 # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly.
177 # There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly.
171 # This is the case at least with shadow builds.
178 # This is the case at least with shadow builds.
172 # http://qt-project.org/wiki/jom
179 # http://qt-project.org/wiki/jom
173
180
174 development_build:!win32-msvc*:{
181 development_build:!win32-msvc*:{
175 chartversion.target = $$PWD/qchartversion_p.h
182 chartversion.target = $$PWD/qchartversion_p.h
176
183
177 unix:{
184 unix:{
178 chartversion.commands = @echo \
185 chartversion.commands = @echo \
179 \" $${LITERAL_HASH}ifndef QCHARTVERSION_P_H\\n\
186 \" $${LITERAL_HASH}ifndef QCHARTVERSION_P_H\\n\
180 $${LITERAL_HASH}define QCHARTVERSION_P_H\\n\
187 $${LITERAL_HASH}define QCHARTVERSION_P_H\\n\
181 const char *buildTime = \\\"`date +'%y%m%d%H%M'`\\\" ; \\n\
188 const char *buildTime = \\\"`date +'%y%m%d%H%M'`\\\" ; \\n\
182 const char *gitHead = \\\"`git rev-parse HEAD`\\\" ; \\n \
189 const char *gitHead = \\\"`git rev-parse HEAD`\\\" ; \\n \
183 $${LITERAL_HASH}endif \" \
190 $${LITERAL_HASH}endif \" \
184 > \
191 > \
185 $$chartversion.target;
192 $$chartversion.target;
186 }else{
193 }else{
187 chartversion.commands = @echo \
194 chartversion.commands = @echo \
188 "const char *buildTime = \"%date%_%time%\" ; \
195 "const char *buildTime = \"%date%_%time%\" ; \
189 const char *gitHead = \"unknown\" ; " \
196 const char *gitHead = \"unknown\" ; " \
190 > \
197 > \
191 $$chartversion.target
198 $$chartversion.target
192 }
199 }
193
200
194 chartversion.depends = $$HEADERS \
201 chartversion.depends = $$HEADERS \
195 $$SOURCES
202 $$SOURCES
196
203
197 PRE_TARGETDEPS += $$chartversion.target
204 PRE_TARGETDEPS += $$chartversion.target
198 QMAKE_CLEAN += $$PWD/qchartversion_p.h
205 QMAKE_CLEAN += $$PWD/qchartversion_p.h
199 QMAKE_EXTRA_TARGETS += chartversion
206 QMAKE_EXTRA_TARGETS += chartversion
200 }
207 }
201
208
202 ############################### CLEAN ###########################################
209 ############################### CLEAN ###########################################
203
210
204 unix:QMAKE_DISTCLEAN += -r \
211 unix:QMAKE_DISTCLEAN += -r \
205 $$CHART_BUILD_HEADER_DIR \
212 $$CHART_BUILD_HEADER_DIR \
206 $$CHART_BUILD_LIB_DIR
213 $$CHART_BUILD_LIB_DIR
207 win32:QMAKE_DISTCLEAN += /Q \
214 win32:QMAKE_DISTCLEAN += /Q \
208 $$CHART_BUILD_HEADER_DIR \
215 $$CHART_BUILD_HEADER_DIR \
209 $$CHART_BUILD_LIB_DIR
216 $$CHART_BUILD_LIB_DIR
210
217
211 ############################## COVERAGE #########################################
218 ############################## COVERAGE #########################################
212
219
213 unix:coverage:{
220 unix:coverage:{
214
221
215 QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
222 QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
216 QMAKE_LDFLAGS += -fprofile-arcs -ftest-coverage
223 QMAKE_LDFLAGS += -fprofile-arcs -ftest-coverage
217
224
218 LIBS += -lgcov
225 LIBS += -lgcov
219
226
220 QMAKE_CLEAN += $$OBJECTS_DIR/*.gcda $$OBJECTS_DIR/*.gcno $$PWD/*.gcov ../coverage/*.info
227 QMAKE_CLEAN += $$OBJECTS_DIR/*.gcda $$OBJECTS_DIR/*.gcno $$PWD/*.gcov ../coverage/*.info
221 QMAKE_EXTRA_TARGETS += preparecoverage gencoverage
228 QMAKE_EXTRA_TARGETS += preparecoverage gencoverage
222
229
223 preparecoverage.target = prepare_coverage
230 preparecoverage.target = prepare_coverage
224 preparecoverage.depends = all
231 preparecoverage.depends = all
225 preparecoverage.commands = lcov --directory $$OBJECTS_DIR --zerocounters ;\
232 preparecoverage.commands = lcov --directory $$OBJECTS_DIR --zerocounters ;\
226 lcov -i -d $$OBJECTS_DIR -c -o ../coverage/base.info -b $$PWD;
233 lcov -i -d $$OBJECTS_DIR -c -o ../coverage/base.info -b $$PWD;
227
234
228 gencoverage.target = gen_coverage
235 gencoverage.target = gen_coverage
229 gencoverage.depends = all
236 gencoverage.depends = all
230 gencoverage.commands = lcov -d $$OBJECTS_DIR -c -o ../coverage/src.info -b $$PWD;\
237 gencoverage.commands = lcov -d $$OBJECTS_DIR -c -o ../coverage/src.info -b $$PWD;\
231 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;\
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;\
232 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;\
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;\
233 lcov -a ../coverage/base.info -a ../coverage/src.info -o ../coverage/coverage.info;
240 lcov -a ../coverage/base.info -a ../coverage/src.info -o ../coverage/coverage.info;
234 }
241 }
235
242
@@ -1,7 +1,5
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4
4
5 SOURCES += tst_chartdataset.cpp
5 SOURCES += tst_chartdataset.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,6 +1,4
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_domain.cpp
4 SOURCES += tst_domain.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,8 +1,6
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4
4
5 SOURCES += \
5 SOURCES += \
6 tst_qbarmodelmapper.cpp
6 tst_qbarmodelmapper.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,6 +1,4
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qbarseries.cpp
4 SOURCES += tst_qbarseries.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,6 +1,4
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qbarset.cpp
4 SOURCES += tst_qbarset.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,6 +1,4
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qchart.cpp
4 SOURCES += tst_qchart.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,6 +1,4
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qchartview.cpp
4 SOURCES += tst_qchartview.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,6 +1,4
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qgroupedbarseries.cpp
4 SOURCES += tst_qgroupedbarseries.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,7 +1,5
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 HEADERS += ../qxyseries/tst_qxyseries.h
4 HEADERS += ../qxyseries/tst_qxyseries.h
5 SOURCES += tst_qlineseries.cpp ../qxyseries/tst_qxyseries.cpp
5 SOURCES += tst_qlineseries.cpp ../qxyseries/tst_qxyseries.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,6 +1,4
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qpercentbarseries.cpp
4 SOURCES += tst_qpercentbarseries.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,8 +1,6
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4
4
5 SOURCES += \
5 SOURCES += \
6 tst_qpiemodelmapper.cpp
6 tst_qpiemodelmapper.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,6 +1,4
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qpieseries.cpp
4 SOURCES += tst_qpieseries.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,6 +1,4
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qpieslice.cpp
4 SOURCES += tst_qpieslice.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,6 +1,4
1 !include( ../auto.pri ):error( "Couldn't find the auto.pri file!" )
1 !include( ../auto.pri ):error( "Couldn't find the auto.pri file!" )
2
2
3 HEADERS += ../qxyseries/tst_qxyseries.h
3 HEADERS += ../qxyseries/tst_qxyseries.h
4 SOURCES += tst_qscatterseries.cpp ../qxyseries/tst_qxyseries.cpp
4 SOURCES += tst_qscatterseries.cpp ../qxyseries/tst_qxyseries.cpp
5
6 !system_build:mac:QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,7 +1,5
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 HEADERS += ../qxyseries/tst_qxyseries.h
4 HEADERS += ../qxyseries/tst_qxyseries.h
5 SOURCES += tst_qsplineseries.cpp ../qxyseries/tst_qxyseries.cpp
5 SOURCES += tst_qsplineseries.cpp ../qxyseries/tst_qxyseries.cpp
6
7 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,6 +1,4
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4 SOURCES += tst_qstackedbarseries.cpp
4 SOURCES += tst_qstackedbarseries.cpp
5
6 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,8 +1,6
1 !include( ../auto.pri ) {
1 !include( ../auto.pri ) {
2 error( "Couldn't find the auto.pri file!" )
2 error( "Couldn't find the auto.pri file!" )
3 }
3 }
4
4
5 SOURCES += \
5 SOURCES += \
6 tst_qxymodelmapper.cpp
6 tst_qxymodelmapper.cpp
7
8 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_AUTOTESTS_BIN_DIR"
@@ -1,20 +1,18
1 !include( ../tests.pri ) {
1 !include( ../tests.pri ) {
2 error( "Couldn't find the test.pri file!" )
2 error( "Couldn't find the test.pri file!" )
3 }
3 }
4
4
5 TEMPLATE = app
5 TEMPLATE = app
6
6
7 QT += core gui
7 QT += core gui
8 contains(QT_MAJOR_VERSION, 5) {
8 contains(QT_MAJOR_VERSION, 5) {
9 QT += widgets
9 QT += widgets
10 }
10 }
11
11
12 SOURCES += main.cpp \
12 SOURCES += main.cpp \
13 mainwidget.cpp \
13 mainwidget.cpp \
14 dataseriedialog.cpp
14 dataseriedialog.cpp
15
15
16 HEADERS += \
16 HEADERS += \
17 mainwidget.h \
17 mainwidget.h \
18 dataseriedialog.h
18 dataseriedialog.h
19
20 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_TESTS_BIN_DIR"
@@ -1,10 +1,8
1 !include( ../tests.pri ) {
1 !include( ../tests.pri ) {
2 error( "Couldn't find the test.pri file!" )
2 error( "Couldn't find the test.pri file!" )
3 }
3 }
4
4
5 RESOURCES += resources.qrc
5 RESOURCES += resources.qrc
6 SOURCES += main.cpp
6 SOURCES += main.cpp
7
7
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
8 include(qmlapplicationviewer/qmlapplicationviewer.pri)
9
10 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_DEMOS_BIN_DIR"
@@ -1,9 +1,7
1 !include( ../tests.pri ) {
1 !include( ../tests.pri ) {
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4 QT+=opengl
4 QT+=opengl
5 TARGET = wavechart
5 TARGET = wavechart
6 SOURCES += main.cpp wavechart.cpp
6 SOURCES += main.cpp wavechart.cpp
7 HEADERS += wavechart.h
7 HEADERS += wavechart.h
8
9 !system_build:mac: QMAKE_POST_LINK += "$$MAC_POST_LINK_PREFIX $$MAC_TESTS_BIN_DIR"
General Comments 0
You need to be logged in to leave comments. Login now