##// END OF EJS Templates
Adds private headers handling...
Michal Klocek -
r193:862e361671e1
parent child
Show More
@@ -1,15 +1,23
1 1 !include(common.pri) {
2 2 error('missing common.pri')
3 3 }
4 4
5 5 TEMPLATE = subdirs
6 SUBDIRS += src qmlplugin example test
6 SUBDIRS += src
7
8 integrated_build:{
9 message('Configured for integrated build')
10 SUBDIRS += example test qmlplugin
11 }else{
12 message('Please build example test and qmlplugin after installing library.')
13 }
14
7 15 CONFIG += ordered
8 16 QMAKE_CXXFLAGS += -g -Wall
9 17 unix:QMAKE_DISTCLEAN += -r build bin
10 18 win32:QMAKE_DISTCLEAN += /Q build bin
11 19
12 20 # install feature file
13 21 feature.path = $$[QT_INSTALL_DATA]/mkspecs/features
14 22 feature.files = $$PWD/features/qtcommercialchart.prf
15 23 INSTALLS += feature
@@ -1,23 +1,25
1 1 CONFIG+=integrated_build #remove if you want to build against installed libs
2 2
3 CHART_BUILD_HEADER_DIR = $$PWD/include
3 CHART_BUILD_PUBLIC_HEADER_DIR = $$PWD/include
4 CHART_BUILD_PRIVATE_HEADER_DIR = $$CHART_BUILD_PUBLIC_HEADER_DIR/private
4 5 CHART_BUILD_LIB_DIR = $$PWD/lib
5 6 CHART_BUILD_DIR = $$PWD/build
6 7 CHART_BUILD_BIN_DIR = $$PWD/bin
7 8
8 9 # hack to fix windows builds
9 10 win32:{
10 CHART_BUILD_HEADER_DIR = $$replace(CHART_BUILD_HEADER_DIR, "/","\\")
11 CHART_BUILD_PUBLIC_HEADER_DIR = $$replace(CHART_BUILD_PUBLIC_HEADER_DIR, "/","\\")
12 CHART_BUILD_PRIVATE_HEADER_DIR = $$replace(CHART_BUILD_PRIVATE_HEADER_DIR, "/","\\")
11 13 CHART_BUILD_LIB_DIR = $$replace(CHART_BUILD_LIB_DIR, "/","\\")
12 14 CHART_BUILD_BUILD_DIR = $$replace(CHART_BUILD_BUILD_DIR, "/","\\")
13 15 CHART_BUILD_BIN_DIR = $$replace(CHART_BUILD_BIN_DIR, "/","\\")
14 16 }
15 17
16 18 mac: {
17 19 # TODO: The following qmake flags are a work-around to make QtCommercial Charts compile on
18 20 # QtCommercial 4.8. On the other hand Charts builds successfully with Qt open source 4.8
19 21 # without these definitions, so this is probably a configuration issue on QtCommercial 4.8;
20 22 # it should probably define the minimum OSX version to be 10.5...
21 23 QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
22 24 QMAKE_LFLAGS *= -mmacosx-version-min=10.5
23 25 }
@@ -1,49 +1,50
1 1 integrated_build:{
2 message('Internal build within charts core source tree')
3 INCLUDEPATH += $$CHART_BUILD_HEADER_DIR
2 message('Running integrated build against local libs...')
3 INCLUDEPATH += $$CHART_BUILD_PUBLIC_HEADER_DIR
4 4
5 5 !win32: {
6 6 LIBS += -L $$CHART_BUILD_LIB_DIR -Wl,-rpath,$$CHART_BUILD_LIB_DIR
7 7 }else{
8 8 LIBS += -L $$CHART_BUILD_LIB_DIR
9 9 }
10 10
11 11 DESTDIR = $$CHART_BUILD_BIN_DIR
12 12
13 13 CONFIG(debug, debug|release) {
14 14 LIBS += -lQtCommercialChartd
15 15 #this is ugly hack to work around missing rpath, it simply copies lib
16 16 win32:{
17 17 copylib.target = $$CHART_BUILD_BIN_DIR/QtCommercialChartd.dll
18 18 copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\\QtCommercialChartd.dll $$CHART_BUILD_BIN_DIR
19 19 copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChartd.dll
20 20 PRE_TARGETDEPS += $$CHART_BUILD_BIN_DIR/QtCommercialChartd.dll
21 21 QMAKE_EXTRA_TARGETS +=copylib
22 22 }
23 23 } else {
24 24 LIBS += -lQtCommercialChart
25 25
26 26 #this is ugly hack to work around missing rpath, it simply copies lib
27 27 win32: {
28 28 copylib.target = $$CHART_BUILD_BIN_DIR/QtCommercialChart
29 29 copylib.commands = $$QMAKE_COPY $$CHART_BUILD_LIB_DIR\\QtCommercialChart.dll $$CHART_BUILD_BIN_DIR
30 30 copylib.depends = $$CHART_BUILD_LIB_DIR/QtCommercialChart.dll
31 31 PRE_TARGETDEPS += $$CHART_BUILD_BIN_DIR/QtCommercialChart
32 32 QMAKE_EXTRA_TARGETS +=copylib
33 33 }
34 34 }
35 35
36 36 mac: {
37 37 # This is a hack to make binaries to use the internal version of the QtCommercial Charts library on OSX
38 38 QMAKE_POST_LINK += install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/chartwidgettest.app/Contents/MacOS/chartwidgettest
39 39 QMAKE_POST_LINK += && install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/barchart.app/Contents/MacOS/barchart
40 40 QMAKE_POST_LINK += && install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/colorlineChart.app/Contents/MacOS/colorlineChart
41 41 QMAKE_POST_LINK += && install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/lineChart.app/Contents/MacOS/lineChart
42 42 QMAKE_POST_LINK += && install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/percentbarchart.app/Contents/MacOS/percentbarchart
43 43 QMAKE_POST_LINK += && install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/stackedbarchart.app/Contents/MacOS/stackedbarchart
44 44 QMAKE_POST_LINK += && install_name_tool -change "libQtCommercialChartd.1.dylib" "@rpath/libQtCommercialChartd.dylib" $$CHART_BUILD_BIN_DIR/zoomLineChart.app/Contents/MacOS/zoomLineChart
45 45 }
46 46
47 47 } else {
48 message('Running build aginst system libs...')
48 49 CONFIG+=qtcommercialchart
49 50 }
@@ -1,116 +1,124
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 CONFIG += debug_and_release
8 8 CONFIG(debug, debug|release):TARGET = QtCommercialChartd
9 9 SOURCES += barchart/barchartseries.cpp \
10 10 barchart/bargroup.cpp \
11 11 barchart/bar.cpp \
12 12 barchart/stackedbarchartseries.cpp \
13 13 barchart/stackedbargroup.cpp \
14 14 barchart/percentbarchartseries.cpp \
15 15 barchart/percentbargroup.cpp \
16 16 barchart/barlabel.cpp \
17 17 barchart/barchartmodel.cpp \
18 18 barchart/separator.cpp \
19 19 barchart/bargroupbase.cpp \
20 20 barchart/qbarset.cpp \
21 21 barchart/qbarcategory.cpp \
22 22 linechart/linechartanimationitem.cpp \
23 23 linechart/linechartitem.cpp \
24 24 linechart/qlinechartseries.cpp \
25 25 qscatterseries.cpp \
26 26 #scatterpresentation.cpp \
27 27 qchart.cpp \
28 28 axisitem.cpp \
29 29 qchartview.cpp \
30 30 qchartseries.cpp \
31 31 qchartaxis.cpp \
32 32 charttheme.cpp \
33 33 chartdataset.cpp \
34 34 chartpresenter.cpp \
35 35 domain.cpp \
36 36 scatterpresenter.cpp
37 37 PRIVATE_HEADERS += linechart/linechartitem_p.h \
38 38 linechart/linechartanimationitem_p.h \
39 39 barchart/barlabel_p.h \
40 40 barchart/bar_p.h \
41 41 barchart/separator_p.h \
42 42 barchart/barchartmodel_p.h \
43 43 qscatterseries_p.h \
44 44 #scatterpresentation.h \
45 45 axisitem_p.h \
46 46 chartitem_p.h \
47 47 charttheme_p.h \
48 48 chartdataset_p.h \
49 49 chartpresenter_p.h \
50 50 domain_p.h
51 51 PUBLIC_HEADERS += linechart/qlinechartseries.h \
52 52 barchart/barchartseries.h \
53 53 barchart/bargroup.h \
54 54 barchart/stackedbarchartseries.h \
55 55 barchart/stackedbargroup.h \
56 56 barchart/percentbarchartseries.h \
57 57 barchart/percentbargroup.h \
58 58 barchart/bargroupbase.h \
59 59 barchart/qbarset.h \
60 60 barchart/qbarcategory.h \
61 61 qchartseries.h \
62 62 qscatterseries.h \
63 63 qchart.h \
64 64 qchartglobal.h \
65 65 qchartview.h \
66 66 qchartaxis.h
67 67
68 68 include(piechart/piechart.pri)
69 69
70 70 THEMES += themes/chartthemeicy_p.h \
71 71 themes/chartthemegrayscale_p.h \
72 72 themes/chartthemescientific_p.h \
73 73 themes/chartthemevanilla_p.h
74 74 HEADERS += $$PUBLIC_HEADERS \
75 75 scatterpresenter.h
76 76 HEADERS += $$PRIVATE_HEADERS
77 77 HEADERS += $$THEMES
78 78 INCLUDEPATH += linechart \
79 79 barchart \
80 80 themes \
81 81 .
82 82 OBJECTS_DIR = $$CHART_BUILD_DIR/lib
83 83 MOC_DIR = $$CHART_BUILD_DIR/lib
84 84 UI_DIR = $$CHART_BUILD_DIR/lib
85 85 RCC_DIR = $$CHART_BUILD_DIR/lib
86 86 DEFINES += QTCOMMERCIALCHART_LIBRARY
87 87 public_headers.path = $$[QT_INSTALL_HEADERS]/QtCommercialChart
88 88 public_headers.files = $$PUBLIC_HEADERS
89 89 target.path = $$[QT_INSTALL_LIBS]
90 90 INSTALLS += target \
91 91 public_headers
92 install_build_headers.name = bild_headers
93 install_build_headers.output = $$CHART_BUILD_HEADER_DIR/${QMAKE_FILE_BASE}.h
94 install_build_headers.input = PUBLIC_HEADERS
95 install_build_headers.commands = $$QMAKE_COPY \
92 install_build_public_headers.name = bild_public_headers
93 install_build_public_headers.output = $$CHART_BUILD_PUBLIC_HEADER_DIR/${QMAKE_FILE_BASE}.h
94 install_build_public_headers.input = PUBLIC_HEADERS
95 install_build_public_headers.commands = $$QMAKE_COPY \
96 96 ${QMAKE_FILE_NAME} \
97 $$CHART_BUILD_HEADER_DIR
98 install_build_headers.CONFIG += target_predeps \
97 $$CHART_BUILD_PUBLIC_HEADER_DIR
98 install_build_public_headers.CONFIG += target_predeps \
99 99 no_link
100 QMAKE_EXTRA_COMPILERS += install_build_headers
100 install_build_private_headers.name = bild_private_headers
101 install_build_private_headers.output = $$CHART_BUILD_PRIVATE_HEADER_DIR/${QMAKE_FILE_BASE}.h
102 install_build_private_headers.input = PRIVATE_HEADERS
103 install_build_private_headers.commands = $$QMAKE_COPY \
104 ${QMAKE_FILE_NAME} \
105 $$CHART_BUILD_PRIVATE_HEADER_DIR
106 install_build_private_headers.CONFIG += target_predeps \
107 no_link
108 QMAKE_EXTRA_COMPILERS += install_build_public_headers install_build_private_headers
101 109 chartversion.target = qchartversion_p.h
102 110 chartversion.commands = @echo \
103 111 "build_time" \
104 112 > \
105 113 $$chartversion.target;
106 114 chartversion.depends = $$HEADERS \
107 115 $$SOURCES
108 116 PRE_TARGETDEPS += qchartversion_p.h
109 117 QMAKE_CLEAN += qchartversion_p.h
110 118 QMAKE_EXTRA_TARGETS += chartversion
111 119 unix:QMAKE_DISTCLEAN += -r \
112 120 $$CHART_BUILD_HEADER_DIR \
113 121 $$CHART_BUILD_LIB_DIR
114 122 win32:QMAKE_DISTCLEAN += /Q \
115 123 $$CHART_BUILD_HEADER_DIR \
116 124 $$CHART_BUILD_LIB_DIR
General Comments 0
You need to be logged in to leave comments. Login now