##// END OF EJS Templates
Adds shadow build support
Michal Klocek -
r708:69e7126c2380
parent child
Show More
@@ -0,0 +1,12
1 INCLUDEPATH += $$PWD
2 DEPENDPATH += $$PWD
3
4 THEMES += \
5 $$PWD/chartthemedefault_p.h \
6 $$PWD/chartthemelight_p.h \
7 $$PWD/chartthemebluecerulean_p.h \
8 $$PWD/chartthemedark_p.h \
9 $$PWD/chartthemebrownsand_p.h \
10 $$PWD/chartthemebluencs_p.h \
11 $$PWD/chartthemeicy_p.h \
12 $$PWD/chartthemescientific_p.h No newline at end of file
@@ -1,32 +1,34
1 1 !include(common.pri) {
2 2 error('missing common.pri')
3 3 }
4 4
5 5 TEMPLATE = subdirs
6 6 SUBDIRS += src examples demos test qmlplugin
7 7
8 8 integrated_build:{
9 9 message('Configured for integrated build against local libs...')
10 10 } else {
11 11 message('Running build aginst system libs...')
12 12 message('Please build example test and qmlplugin after installing library.')
13 13 }
14 14
15 15 CONFIG += ordered
16 16 QMAKE_CXXFLAGS += -g -Wall
17 17 unix:QMAKE_DISTCLEAN += -r build bin include lib doc/html
18 18 win32:QMAKE_DISTCLEAN += /Q /s build bin include lib doc\\html
19 19
20 20 # install feature file
21 21 feature.path = $$[QT_INSTALL_DATA]/mkspecs/features
22 22 feature.files = $$PWD/features/qtcommercialchart.prf
23 23 INSTALLS += feature
24 24
25 25 doc.target = doc
26 26 win32:{
27 27 doc.commands = qdoc3 $$CHART_BUILD_DOC_DIR\\qcharts.qdocconf
28 28 }else{
29 29 doc.commands = qdoc3 $$CHART_BUILD_DOC_DIR/qcharts.qdocconf
30 30 }
31
31 32 doc.depends = FORCE
32 QMAKE_EXTRA_TARGETS += doc
33 QMAKE_EXTRA_TARGETS += docs
34
@@ -1,29 +1,44
1 1 CONFIG+=integrated_build #remove if you want to build against installed libs
2 2
3 CHART_BUILD_PUBLIC_HEADER_DIR = $$PWD/include
3 SHADOW = $$find(PWD, $${OUT_PWD})
4
5 unix:isEmpty(SHADOW){
6 search = "$$PWD:::"
7 temp = $$split(search,"/")
8 temp = $$last(temp)
9 path = $$replace(search,$$temp,'')
10 temp = $$split(OUT_PWD,$$path)
11 temp = $$split(temp,'/')
12 temp = $$first(temp)
13 path = "$${path}$${temp}"
14 SHADOW=$$path
15 }
16
17 CHART_BUILD_PUBLIC_HEADER_DIR = $$SHADOW/include
4 18 CHART_BUILD_PRIVATE_HEADER_DIR = $$CHART_BUILD_PUBLIC_HEADER_DIR/private
5 CHART_BUILD_LIB_DIR = $$PWD/lib
6 CHART_BUILD_DIR = $$PWD/build
7 CHART_BUILD_BIN_DIR = $$PWD/bin
19 CHART_BUILD_LIB_DIR = $$SHADOW/lib
20 CHART_BUILD_DIR = $$SHADOW/build
21 CHART_BUILD_BIN_DIR = $$SHADOW/bin
8 22 CHART_BUILD_PLUGIN_DIR = $$CHART_BUILD_LIB_DIR/QtCommercial/Chart
9 CHART_BUILD_DOC_DIR = $$PWD/doc
23 CHART_BUILD_DOC_DIR = $$SHADOW/doc
24
10 25
11 26 # hack to fix windows builds
12 27 win32:{
13 28 CHART_BUILD_PUBLIC_HEADER_DIR = $$replace(CHART_BUILD_PUBLIC_HEADER_DIR, "/","\\")
14 29 CHART_BUILD_PRIVATE_HEADER_DIR = $$replace(CHART_BUILD_PRIVATE_HEADER_DIR, "/","\\")
15 30 CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_DIR, "/","\\")
16 31 CHART_BUILD_BUILD_DIR = $$replace(CHART_BUILD_BUILD_DIR, "/","\\")
17 32 CHART_BUILD_BIN_DIR = $$replace(CHART_BUILD_BIN_DIR, "/","\\")
18 33 CHART_BUILD_PLUGIN_DIR = $$replace(CHART_BUILD_PLUGIN_DIR, "/","\\")
19 34 CHART_BUILD_DOC_DIR = $$replace(CHART_BUILD_DOC_DIR, "/","\\")
20 35 }
21 36
22 37 mac: {
23 38 # TODO: The following qmake flags are a work-around to make QtCommercial Charts compile on
24 39 # QtCommercial 4.8. On the other hand Charts builds successfully with Qt open source 4.8
25 40 # without these definitions, so this is probably a configuration issue on QtCommercial 4.8;
26 41 # it should probably define the minimum OSX version to be 10.5...
27 42 QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
28 43 QMAKE_LFLAGS *= -mmacosx-version-min=10.5
29 44 }
@@ -1,14 +1,14
1 1 !include( ../examples.pri ) {
2 2 error( "Couldn't find the examples.pri file!" )
3 3 }
4 4
5 5 QT+= sql
6 6 TARGET = gdpbarchart
7 7 SOURCES += main.cpp\
8 8 widget.cpp
9 9 HEADERS += widget.h
10 10
11 11 !mac {
12 12 # TODO: QMAKE_POST_LINK does not work on mac; how to copy the data file?
13 QMAKE_POST_LINK += $$QMAKE_COPY gdpData $$CHART_BUILD_BIN_DIR
13 QMAKE_POST_LINK += $$QMAKE_COPY $$PWD/gdpData $$CHART_BUILD_BIN_DIR
14 14 }
@@ -1,147 +1,140
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 chartdataset.cpp \
12 chartpresenter.cpp \
13 charttheme.cpp \
14 domain.cpp \
15 qchart.cpp \
16 qchartview.cpp \
17 qseries.cpp \
18 qlegend.cpp \
19 legendmarker.cpp \
20 chartbackground.cpp \
21 chart.cpp
11 $$PWD/chartdataset.cpp \
12 $$PWD/chartpresenter.cpp \
13 $$PWD/charttheme.cpp \
14 $$PWD/domain.cpp \
15 $$PWD/qchart.cpp \
16 $$PWD/qchartview.cpp \
17 $$PWD/qseries.cpp \
18 $$PWD/qlegend.cpp \
19 $$PWD/legendmarker.cpp \
20 $$PWD/chartbackground.cpp \
21 $$PWD/chart.cpp
22 22 PRIVATE_HEADERS += \
23 chartdataset_p.h \
24 chartitem_p.h \
25 chartpresenter_p.h \
26 charttheme_p.h \
27 domain_p.h \
28 legendmarker_p.h \
29 chartbackground_p.h \
30 chart_p.h
23 $$PWD/chartdataset_p.h \
24 $$PWD/chartitem_p.h \
25 $$PWD/chartpresenter_p.h \
26 $$PWD/charttheme_p.h \
27 $$PWD/domain_p.h \
28 $$PWD/legendmarker_p.h \
29 $$PWD/chartbackground_p.h \
30 $$PWD/chart_p.h
31 31 PUBLIC_HEADERS += \
32 qchart.h \
33 qchartglobal.h \
34 qseries.h \
35 qchartview.h \
36 qlegend.h
32 $$PWD/qchart.h \
33 $$PWD/qchartglobal.h \
34 $$PWD/qseries.h \
35 $$PWD/qchartview.h \
36 $$PWD/qlegend.h
37 37
38 38 include(animations/animations.pri)
39 39 include(axis/axis.pri)
40 40 include(xychart/xychart.pri)
41 41 include(linechart/linechart.pri)
42 42 include(areachart/areachart.pri)
43 43 include(barchart/barchart.pri)
44 44 include(piechart/piechart.pri)
45 45 include(scatterseries/scatter.pri)
46 46 include(splinechart/splinechart.pri)
47 include(themes/themes.pri)
47 48
48 THEMES += themes/chartthemedefault_p.h \
49 themes/chartthemelight_p.h \
50 themes/chartthemebluecerulean_p.h \
51 themes/chartthemedark_p.h \
52 themes/chartthemebrownsand_p.h \
53 themes/chartthemebluencs_p.h \
54 themes/chartthemeicy_p.h \
55 themes/chartthemescientific_p.h
56 49
57 50 HEADERS += $$PUBLIC_HEADERS
58 51 HEADERS += $$PRIVATE_HEADERS
59 52 HEADERS += $$THEMES
60 53 INCLUDEPATH += linechart \
61 54 barchart \
62 55 themes \
63 56 .
64 57 OBJECTS_DIR = $$CHART_BUILD_DIR/lib
65 58 MOC_DIR = $$CHART_BUILD_DIR/lib
66 59 UI_DIR = $$CHART_BUILD_DIR/lib
67 60 RCC_DIR = $$CHART_BUILD_DIR/lib
68 61 DEFINES += QTCOMMERCIALCHART_LIBRARY
69 62
70 63 #qt public headers
71 64 #this is very primitive and lame parser , TODO: make perl script insted
72 65 !exists($$CHART_BUILD_PUBLIC_HEADER_DIR)
73 66 {
74 67 system($$QMAKE_MKDIR $$CHART_BUILD_PUBLIC_HEADER_DIR)
75 68 }
76 69
77 70 for(file, PUBLIC_HEADERS) {
78 71 name = $$split(file,'/')
79 72 name = $$last(name)
80 73 class = "$$cat($$file)"
81 74 class = $$find(class,class)
82 75 !isEmpty(class){
83 76 class = $$split(class,QTCOMMERCIALCHART_EXPORT)
84 77 class = $$member(class,1)
85 78 class = $$split(class,' ')
86 79 class = $$replace(class,' ','')
87 80 class = $$member(class,0)
88 81 win32:{
89 82 command = "echo $${LITERAL_HASH}include \"$$name\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class"
90 83 }else{
91 84 command = "echo \"$${LITERAL_HASH}include \\\"$$name\\\"\" > $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class"
92 85 }
93 86 PUBLIC_QT_HEADERS += $$CHART_BUILD_PUBLIC_HEADER_DIR/$$class
94 87 system($$command)
95 88 }
96 89 }
97 90
98 91 public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart
99 92 public_headers.files = $$PUBLIC_HEADERS $$PUBLIC_QT_HEADERS
100 93
101 94 target.path = $$[QT_INSTALL_LIBS]
102 95 INSTALLS += target public_headers
103 96
104 97 install_build_public_headers.name = build_public_headers
105 98 install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h
106 99 install_build_public_headers.input = PUBLIC_HEADERS
107 100 install_build_public_headers.commands = $$QMAKE_COPY \
108 101 ${QMAKE_FILE_NAME} \
109 102 $$CHART_BUILD_PUBLIC_HEADER_DIR
110 103 install_build_public_headers.CONFIG += target_predeps \
111 104 no_link
112 105
113 106 install_build_private_headers.name = buld_private_headers
114 107 install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h
115 108 install_build_private_headers.input = PRIVATE_HEADERS
116 109 install_build_private_headers.commands = $$QMAKE_COPY \
117 110 ${QMAKE_FILE_NAME} \
118 111 $$CHART_BUILD_PRIVATE_HEADER_DIR
119 112 install_build_private_headers.CONFIG += target_predeps \
120 113 no_link
121 114
122 115 QMAKE_EXTRA_COMPILERS += install_build_public_headers \
123 116 install_build_private_headers \
124 117
125 118 chartversion.target = qchartversion_p.h
126 119 chartversion.commands = @echo \
127 120 "build_time" \
128 121 > \
129 122 $$chartversion.target;
130 123 chartversion.depends = $$HEADERS \
131 124 $$SOURCES
132 125 PRE_TARGETDEPS += qchartversion_p.h
133 126 QMAKE_CLEAN += qchartversion_p.h
134 127 QMAKE_EXTRA_TARGETS += chartversion
135 128 unix:QMAKE_DISTCLEAN += -r \
136 129 $$CHART_BUILD_HEADER_DIR \
137 130 $$CHART_BUILD_LIB_DIR
138 131 win32:QMAKE_DISTCLEAN += /Q \
139 132 $$CHART_BUILD_HEADER_DIR \
140 133 $$CHART_BUILD_LIB_DIR
141 134
142 135 # treat warnings as errors
143 136 win32-msvc*: {
144 137 QMAKE_CXXFLAGS += /WX
145 138 } else {
146 139 QMAKE_CXXFLAGS += -Werror
147 140 }
@@ -1,4 +1,4
1 !include( ../test.pri ) {
1 !include( ../../test.pri ) {
2 2 error( "Couldn't find the test.pri file!" )
3 3 }
4 4 SOURCES += tst_chartdataset.cpp
@@ -1,4 +1,4
1 !include( ../test.pri ) {
1 !include( ../../test.pri ) {
2 2 error( "Couldn't find the test.pri file!" )
3 3 }
4 4 SOURCES += tst_domain.cpp
@@ -1,26 +1,19
1 !include( ../../common.pri ) {
2 error( "Couldn't find the common.pri file!" )
3 }
4 !include( ../../integrated.pri ) {
5 error( "Couldn't find the integrated.pri file !")
1 !include( ../test.pri ) {
2 error( "Couldn't find the test.pri file!" )
6 3 }
7 4
8 5 TARGET = chartwidgettest
9 6 TEMPLATE = app
10 DESTDIR = $$CHART_BUILD_BIN_DIR
11 7
12 8 QT += core gui
13 9 contains(QT_MAJOR_VERSION, 5) {
14 10 QT += widgets
15 11 }
16 12
17 OBJECTS_DIR = tmp
18 MOC_DIR = tmp
19
20 13 SOURCES += main.cpp \
21 14 mainwidget.cpp \
22 15 dataseriedialog.cpp
23 16
24 17 HEADERS += \
25 18 mainwidget.h \
26 19 dataseriedialog.h
@@ -1,59 +1,52
1 !include( ../../common.pri ) {
1 !include( ../test.pri ) {
2 2 error( "Couldn't find the common.pri file!" )
3 3 }
4 4
5 DESTDIR = $$CHART_BUILD_BIN_DIR
6
7 OBJECTS_DIR = $$CHART_BUILD_DIR/bin/$$TARGET
8 MOC_DIR = $$CHART_BUILD_DIR/bin/$$TARGET
9 UI_DIR = $$CHART_BUILD_DIR/bin/$$TARGET
10 RCC_DIR = $$CHART_BUILD_DIR/bin/$$TARGET
11
12 5 integrated_build:{
13 6 message(Please export QML_IMPORT_PATH=$$CHART_BUILD_LIB_DIR)
14 7 }
15 8
16 9 RESOURCES += \
17 10 resources.qrc
18 11
19 12 # Add more folders to ship with the application, here
20 13 folder_01.source = qml/qmlchart
21 14 folder_01.target = qml
22 15 DEPLOYMENTFOLDERS = folder_01
23 16
24 17 # Additional import path used to resolve QML modules in Creator's code model
25 18 QML_IMPORT_PATH =
26 19
27 20 symbian:TARGET.UID3 = 0xE421236E
28 21
29 22 # Smart Installer package's UID
30 23 # This UID is from the protected range and therefore the package will
31 24 # fail to install if self-signed. By default qmake uses the unprotected
32 25 # range value if unprotected UID is defined for the application and
33 26 # 0x2002CCCF value if protected UID is given to the application
34 27 #symbian:DEPLOYMENT.installer_header = 0x2002CCCF
35 28
36 29 # Allow network access on Symbian
37 30 symbian:TARGET.CAPABILITY += NetworkServices
38 31
39 32 # If your application uses the Qt Mobility libraries, uncomment the following
40 33 # lines and add the respective components to the MOBILITY variable.
41 34 # CONFIG += mobility
42 35 # MOBILITY +=
43 36
44 37 # Speed up launching on MeeGo/Harmattan when using applauncherd daemon
45 38 # CONFIG += qdeclarative-boostable
46 39
47 40 # Add dependency to Symbian components
48 41 # CONFIG += qt-components
49 42
50 43 # The .cpp file which was generated for your project. Feel free to hack it.
51 44 SOURCES += main.cpp
52 45
53 46 # Please do not modify the following two lines. Required for deployment.
54 47 include(qmlapplicationviewer/qmlapplicationviewer.pri)
55 48 qtcAddDeployment()
56 49
57 50 #HEADERS += \
58 51 # chart.h
59 52
@@ -1,19 +1,19
1 !include( ../../common.pri ) {
1 !include( ../common.pri ) {
2 2 error( "Couldn't find the common.pri file!" )
3 3 }
4 4
5 !include( ../../integrated.pri ) {
5 !include( ../integrated.pri ) {
6 6 error( "Couldn't find the integrated.pri file !")
7 7 }
8 8
9 9 TEMPLATE = app
10 10 CONFIG += qtestlib
11 11
12 12 DESTDIR = $$CHART_BUILD_BIN_DIR/test
13 13 OBJECTS_DIR = $$CHART_BUILD_DIR/test/$$TARGET
14 14 MOC_DIR = $$CHART_BUILD_DIR/test/$$TARGET
15 15 UI_DIR = $$CHART_BUILD_DIR/test/$$TARGET
16 16 RCC_DIR = $$CHART_BUILD_DIR/test/$$TARGET
17 17
18 18 !contains(TARGET, ^tst_.*):TARGET = $$join(TARGET,,"tst_")
19 19
General Comments 0
You need to be logged in to leave comments. Login now